What was difficult was the fact that I couldn't follow along in my classes at school.
What was hard for me was the fact that I had a hard time understanding my classes at school.
「大変だったことは学校の授業についていけなかったことです」を英語にすると:
1)What was difficult was the fact that I couldn't follow along in my classes at school.
What was difficult was = 難しかったことは
the fact that = 〜だったこと
I couldn't follow along = 私はついて行けなかった
2)What was hard for me was the fact that I had a hard time understanding my classes at school.
What was hard for me = 私にとって難しかったこと
I had a hard time understanding〜 = 〜を理解するのに苦戦した
「英語が聞き取れず」を追加するのであれば、I couldn't understand English well so I couldn't follow along in my classes at school (英語がうまく理解できなくて授業について行けなかった)とか I had a hard time understanding the English lectures so I couldn't understand my classes (英語のレクチャーを理解するのに苦戦したので授業を理解できなかった) となります。