As far as I'm aware, most of the world's homophobia was influenced by Islam and Christianity, but India and some other countries on the subcontinent are largely Hindu and Buddhist populations. So what caused homophobia to gain ground there, was it cultural influences or the influence of Muslim sultans occupying India for some time?
Here's my comment from another post about sexuality in Ancient India; followed up by my answer to this question.
When you go back far enough, there is evidence that it was not seen as a taboo and was a socially accepted phenomenon. Khajuraho temples, built during n the Chandela empire, around the 9th century, depict many homosexual acts, among many other sexual depictions, including bestiality. The Maurya empire, in 322 BC, there is some evidence of homosexuality being acceptable too. Chanakya outlines specific fines and punishment for engaging in taboo sexual activities, such as marital rape, premarital rape, adultery, et cetera. When it comes to homosexuality, the only fines and punishments suggested are in situations when sexual relationships are with a minor (i.e. pedophilia), suggesting that regular homosexual relationships were acceptable.
To clear up some information about sexuality in South Asia:
LGBT is a very Western classification pf sexuality. In Hinduism, there isn't a strong concept of sexual orientation when it comes to males, with the third gender, Hijra, being socially accepted since ancient times to this date. Previously, that is to say, according to Vedic texts, other (modern homosexual and other LGBT sexual orientations) were also classified into the third gender.
Now to answer your question about the movement towards homophobia:
In pre-Mughal India, around 9th-10th century, a more modern form of Hinduism was starting to form, moving away from its liberal roots. Under Mughal Sultanate, 'Zina' practices (unlawful intercourse) was a punishable offence, and under the British Raj, sexual activities "against the order of nature' were criminalized. This law is in effect today (despite being repelled at the high court level, it was reinforced by the supreme court).
So, overall, there was little to no homophobia in ancient Indian subcontinent, with the South Asian concept (I say South Asian because it is a social construct, and thus accepted by many other South Asian religions as well) of a third gender (which remains in effect today), followed by a move towards an orthodox non- liberal stance on sexuality near the end of the first millennium (movement away from ancient liberal Hinduism), solidifying thanks to the Mughal (Islamic) and British (Christian) rule over the second millennium.