There are about 2.5 million gays in India of whom 7% are HIV-positive, according to figures submitted by the government to the Supreme Court.
Earlier this month the court had asked for the numbers during a hearing on the decriminalisation of gay sex in India.
A 2009 Delhi High Court ruling that decriminalised same-sex relationships is being challenged.
Many political, social and religious groups want the 19th Century colonial-era law reinstated.
The figures filed by the Ministry of Health were compiled by India's National Aids Control Programme.
The Aids programme has already reached 200,000 men in same-sex relationships and the hope is to raise that number to 400,000.
The prevalence of HIV in the group is 6.54%-7.23%.
But overall, the number of HIV-infected people in India is just 0.2% of the population as the country's Aids control programme has been successful in reducing the number of new infections.
Last month, the Supreme Court criticised the government for its shifting stand on the issue of decriminalising gay sex.
This was after a senior government lawyer, PP Malhotra, told the court that homosexuality was unnatural and immoral.
Within hours, the home ministry disowned the lawyer's statement and said he had read from an out-of-date file.
The health ministry then stated that it supported the 2009 Delhi High Court order decriminalising gay sex.
Judges GS Singhvi and SJ Mukhopadhyaya criticised the government for not doing its "homework" on the case and ordered the government to provide a count of the country's homosexual population for the next hearing.
"You should have done your homework before coming to the court," they told an official.
The 2009 ruling decriminalising gay sex was welcomed by India's gay community, which said the judgement would help protect them from harassment and persecution.
Many people in India still regard same-sex relationships as illegitimate, but rights groups have long argued that the law contravened human rights.
Section 377 of the colonial Indian Penal Code defined homosexual acts as "carnal intercourse against the order of nature" and made them illegal.
But the Delhi High Court said the law was discriminatory and gay sex between consenting adults should not be treated as a crime. Until the high court ruling, homosexual acts were punishable by a 10-year prison term.