The Indian government's HIV/Aids control body has backed calls for homosexuality to be legalised.
Campaigners want the law to be overturned
The National Aids Control Organisation (Naco) said that infected people were being driven underground and efforts to curb the virus were being hampered.
Naco supported a court motion filed by an Aids charity on Wednesday seeking to end a law criminalising homosexuality.
Many homosexuals say they hide their orientation because of harassment, but correspondents say arrests are rare.
Vulnerable to abuse
"It [the law] can adversely contribute to pushing the infection underground and make risky sexual practices go unnoticed and unaddressed," a Naco statement said.
In evidence before the Delhi high court, Naco said that more than 8% of homosexual men in India were infected with HIV, compared to fewer than 1% in the general population.
It said that homosexual people had not been provided with safe places to meet and were forced to use public areas such as toilets and railway stations.
This left them more vulnerable to abuse by police, the group argued, and forced them into hiding with poor access to condoms, health care and safe-sex information.
"The fear of harassment by law enforcement agencies leads to sex being hurried, leaving partners without the notion to consider safer sex practices," it said.
Correspondents say that Naco's stance contradicts the position of the government, which told the Supreme Court last year that the country was not ready to accept gay people.
The Supreme Court has since sent the case back to the Delhi high court.
Figures released by the UN in May estimated that around 5.7 million Indians lived with Aids at the end of 2005, more than any other country and ahead of South Africa's 5.5 million cases.
India's anti-homosexuality laws were drafted by the British in 1861. They make gay sex punishable by up to 10 years in jail.
Section 377 of the Indian penal code prohibits "carnal intercourse against the order of nature with any man, woman or animal".
Campaigners say that homosexuals face an uphill struggle to assert their rights in a country where public hugging and kissing - even among heterosexuals - attracts public disapproval.