A proposed new law would impose the death penalty on some gay Ugandans and their family and friends could face up to seven years in jail if they fail to report them to authorities.
Even landlords could be imprisoned for renting to homosexuals, under a new bill being debated.
Gay rights activists say the bill, which has prompted growing international opposition, promotes hatred and could set back efforts to combat HIV/Aids.
They believe it is part of a continent-wide backlash because Africa's gay community is becoming more vocal.
"It's a question of visibility," said David Cato, who became an activist after he was beaten up four times, arrested twice, sacked from his teaching job and outed in the press because he was gay.
"When we come out and ask for our rights, they pass laws against us."
The legislation has drawn global attention from activists across the spectrum of views on gay issues.
The measure was proposed in Uganda following a visit by leaders of US conservative Christian ministries that promote therapy for gays to become heterosexual.
But at least one of those leaders has condemned the bill, as have some other conservative and liberal Christians in the US.
Gay rights activists say the legislation is likely to pass. But the bill is still being debated and could undergo changes before a vote, which has not yet been set.
The Ugandan legislation in its current form would mandate a death sentence for active homosexuals living with HIV or in cases of same-sex rape.
"Serial offenders" also could face capital punishment, but the legislation does not define the term. Anyone convicted of a homosexual act faces life imprisonment.
Anyone who "aids, abets, counsels or procures another to engage of acts of homosexuality" faces seven years in prison if convicted.
Landlords who rent rooms or homes to homosexuals also could get seven years and anyone with "religious, political, economic or social authority" who fails to report anyone in breach of the act faces three years.
A protest against the bill will take place in London tomorrow. Last month protests were held in New York and Washington.
David Bahati, the politician sponsoring the bill, said he was encouraging "constructive criticism" to improve the law, but insisted strict measures were necessary to stop homosexuals from "recruiting" schoolchildren.
"The youths in secondary schools copy everything from the Western world and America," said high school teacher David Kisambira.
"A good number of students have been converted into gays. We hear there are groups of people given money by some gay organisations in developed countries to recruit youth into gay activities."
Uganda's ethics minister James Nsaba Buturo said the death sentence clause would probably be reviewed but maintained the law was necessary to counter foreign influence. He said homosexuality "is not natural in Uganda".
Uganda is not the only country considering anti-gay laws. Nigeria, where homosexuality is already punishable by imprisonment or death, is considering strengthening penalties for activities deemed to promote it. Burundi has just banned same-sex relationships and Rwanda is considering it.
Homophobia is rife even in more tolerant African countries.
In Kenya, homosexuality is illegal, but the government has acknowledged its existence by launching a sexual orientation survey to improve health care.
Nevertheless, the recent marriage of two Kenyan men in London caused outrage, with the men's families in Kenya harassed by reporters and villagers.
In South Africa, the only African nation to recognise gay marriage, gangs carry out so-called "corrective" rapes on lesbians. A 19-year-old lesbian athlete was gang-raped, tortured and murdered in 2008.