The cases are being heard this week in the Supreme Court, with the men, one from Cameroon and the other from Iran, appealing against previous court decisions barring them from gaining asylum.
Gay asylum campaigners argue that the UK frequently tells gay asylum seekers that they can return to homophobic countries if they are "discreet" or relocate.
The two cases will be heard separately over three days.
The Cameroonian man is appealing against a tribunal decision which could he could be sent home despite being attacked after he was seen kissing his partner.
The Iranian man was told by a tribunal that he must expect persecution for his homosexuality and could avoid it by being discreet.
Angela Mason, the patron of the UK Lesbian and Gay Immigration Group, told the Guardian: "It seems that the Home Office are routinely refusing applications on the grounds that lesbians and gay men can go back and be 'discreet' or 'relocate'.
"Decisions are being made by Home Office case owners who lack essential training on dealing with such claims … The result is that lesbian and gay asylum seekers who are already experiencing persecution may also face discrimination in our own country."
Last month, an Amnesty International report claimed that the UK and several other European countries were breaching international law on returning vulnerable Iraqi asylum seekers.
According to the report, women, ethnic minorities and gays, or those perceived to be gay, are most likely to be at risk of violence and persecution in the country.
Amnesty accused the UK, along with several other countries, of forcibly returning "scores" of Iraqis to dangerous areas in the country, breaking international rules.