David Watkins, 29, accepted pound;9,500 compensation and a full apology from governors at his former school, College Park in Paddington, west London, at an employment tribunal.
Mr Watkins (left), joined the special school as a newly qualified teacher in September 2006. The then head accused him of mincing, saying, "you didn't walk that way at interview", he said. She also accused him of "banging on" about homosexuality in lessons during anti-bullying week and at an assembly to mark world aids day. She told him he "wasn't the only one in the village", a reference to the TV comedy Little Britain.
Mr Watkins said: "You can't take a whole week off the timetable for anti-bullying week and not mention homophobic bullying. Likewise, you can't talk about aids and not mention gay people. Trainee teachers learn a lot at college about diversity issues and how to teach it."
He said that too many gay people, including teachers, tried to ignore homophobic comments.
Steve Sinnott, general secretary of the National Union of Teachers, his union, said: "David's employers should have recognised immediately that the headteacher's comments were humiliating, offensive and amounted to unlawful harassment."
The headteacher who made the homophobic comments has since left, but Regan Watkinson, College Park's acting head, said the school had since undertaken a thorough review of the relevant procedures and policies and made appropriate changes.
"Senior members of staff are committed to rigorously enforcing the relevant policies, which will be monitored by governors," she said.
Mr Watkin's payout came as the gay rights group Stonewall erected 600 billboards around the country, bearing the slogan "Some people are gay. Get over it!" The adverts aimed to highlight the organisation's Education for All anti-homophobic bullying in schools campaign.
Photograph: Neil Turner.