A high school teacher here weighing in. OP, your advice to your son to go and talk to his teacher is absolutely the best advice. I can speak from experience that sometimes we teachers can say something in the heat of the moment that hurts a student's feelings, and we are completely unaware of it. A typical class has 35 or so kids, multiplied by 5 periods. With those kinds of numbers, things can be said in the hustle and bustle and reactions not noticed. I have had students (not many, but a couple in 10 years) tell me they didn't think I liked them and I was just shocked! Honestly, I have never disliked a kid, nor have I heard colleagues talk about not liking a certain kid. Really. We'll get frustrated sometimes, just like parents do, but it is really rare for it to become an active disliking of a teenage kid.
The teacher was frustrated and said something inappropriate in the heat of the moment. If it's not a pattern, cut her some slack, and explain to your son that someday he'll need someone to cut him some slack, too. We all do at one time or another.