Legal challenges to the Californian ban are expected
Gordon Brown has condemned California's ban on gay marriage as "unacceptable" and warned people to be vigilant against all forms of discrimination.
The prime minister said the ban, backed in a referendum in the US state in November, would "undo" much of recent progress made in tackling prejudice.
California became the 28th US state to prohibit gay marriage, overturning an earlier court ruling legalising it.
Same-sex civil partnerships became law in the UK in 2005.
Civil partnerships gave gay partners the same tax and inheritance rights as heterosexual married couples.
Mr Brown made the comments at a reception in Downing Street for leading figures from the lesbian, gay, bisexual and transgender community.
Nearly 20,000 gay couples have married in California since same-sex unions were legalised in May and the state authorities have said these will remain valid.
The referendum, which gained 52% support, called for the state's constitution to be amended to include the stipulation that "only marriage between a man and a woman is valid or recognised".
Mr Brown said "this attempt to undo good that has been done is unacceptable".
He added: "This shows why we have always got to be vigilant, always got to fight homophobic behaviour and any form of discrimination."
He also praised equality campaigners in the UK for "changing opinion" about same-sex unions.
"You have shown how the legislative process, by your pressure, can respond," he said.