I got straight A's in all math classes all during high school. Then I promptly failed the same first-year college math course, three years in a row (after that first fail I learned to drop this class before the deadline, so it never showed up as three fails). Eventually my sister told me that I could take this particular class at a different college, and I passed it when I did that. I guess some combination of the teacher, the lecture hall, the other students, and the types of tests they gave made me fail it over and over, when I wasn't stupid to begin with.
The same thing happened to me with physics. I failed high-school physics twice, despite tutoring, and then tried to take it in summer school with a different teacher in a different school. In summer school I got A+ in the same course. No one could understand this.
Similar circumstances with English and Chemistry. It got to the point that I learned whenever I wasn't doing well in a course, I should re-take it somewhere else instead of taking it again in the same place. Apparently, I am very sensitive to the teacher and the class setting. Something about particular teachers was short-circuiting my brain. To this day, no one believes me or has any explanation for that.