Or you could look at it differently and say that the norms of these systems (school, family) were to discriminate against homosexuality. In your instance, when you went to a system (school) with different norms and encountered gay people, it allowed you to change your own views.
So what I see at work is the evolution of liberal thinking, basic rationality based on self interest, the interplay between, say a fear of being out competed by outside groups and the danger of too much inbreeding, the development of mechanisms, traditions, and formalities that bind families clans nations and races right up to international treaties, an ever expanding inclusiveness, of the recognition that we are all the same and all of the social, political, economic, as well as emotional values of seeing each other as human that the growth of systemized liberal thinking creates in the pursuit of rational utilitarianism.
Change the system, change the man; change the man in increasing numbers, change the system, the slow march of on earth as it is in heaven. We are born with a sense of justice and impelled to wish it for others.
The problem with bigotry, I think, is that the human brain is evolved to detect patterns and verbalize them into memes which can then label others in the form of put-downs. This is how we transmit our learned self hate by transferring the hate we were shown in being put down onto others. Repressed anger, feelings we were taught by violence and fear of shame to express, has to go somewhere and it goes where it is tolerated by the source of authority.
So it is very important to work on changing what authority will tolerate. But at the same time nothing in the individual changes if those feelings aren’t given some avenue of expression. America needs psychotherapy, acceptance of self by allowing the expression of the suffering we have buried as children. Heal the system fewer sick, fewer sick easier to change the system.