In the English translation of the Bhagavad Gita, Lord Krishna says to Arjuna, urging him to fight in the Mahabharata war:
"Do not become a coward, O Arjuna, because it does not befit you. Shake off this weakness of your heart and get up (for the battle), O Arjuna." (2.03)
There are many English translations and sadly, many translations into Indian languages that are retranslations of English. The actual Sanskrit word translated as "coward" above is "Kliba". The meaning of Kliba is very clear from multiple Sanskrit sources. It means any man who would make an unsuitable husband for a woman because he is impotent with women for physical or psychological reasons. It is also clear from Sanskrit texts that list the many types of men who are Kliba, that it includes gay men.
English translators of ancient Hindu (and Buddhist) texts often deliberately translated words that seemed vulgar to their Victorian English audiences inaccurately (or just left the sections out of the translation completely). The most precise translation they could come up with for Kliba and therefor the one that has most often stuck even into modern times is "eunuch", although the practice of castrating boys to make sterile men (eunuchs) was unknown in ancient India, though it was later introduced from the Muslim world.
For scholars who know the accurate meaning of "Kliba", the very famous verse from the Bhagavad Gita that I quoted above has been taken to be a condemnation of Homosexuality in (arguably) Hinduism's most important scripture.
However, this is only because people read the Bhagavad Gita outside of its Mahabharata context. People who know the full story known that just before the start of the war, Arjuna and his brothers spent twelve years in exile and then the thirteenth year in disguise. Arjuna spent his thirteenth year disguised as a woman Brihannala, but due to a curse from the Apsara Urvashi, he was not only disguised as a woman, he was changed into a woman to the extent that when the women of the king's harem "inspected" "him" (presumably looked at his genitals), he passed as a woman.
It is clear from the context that Krishna's words to Arjuna at the start of the war were not a criticism of Kliba people. In the context of the Mahabharata, it should be:
"Do not hesitate Arjuna, otherwise people will think that you are still a transexual woman, (i.e. Brihannala)".
There is a very interesting book called:
Tritiya-Prakriti: People of the Third Sex: Understanding Homosexuality,Transgender Identity,and Intersex Conditions Through Hinduism by Amara Das Wilhelm
I have to admit that I have only read about the first half. It does drag on a bit but it contains a huge quantity of well researched information about Homosexuality and Hinduism historically.
PS, I have uploaded the epub of that book to this site if you are interested.