A statewide referendum on the issue, known as Proposition 8, imposed a bar on gay unions in November 2008 but that was overturned by a court in 2010.
Now a three-judge panel of the 9th US Circuit Court of Appeals has ruled 2-1 that the latter judgement was correct.
Supporters of the ban previously vowed to challenge the panel's decision if it went against them.
Lawyers for those backing the ban are expected to take the issue to the US Supreme Court.
Proposition 8 was a 2008 ballot measure that amended the California constitution to state that "only marriage between a man and a woman is valid or recognised in California".
Two same-sex couples challenged the measure, saying it violated their right to equal protection under the US constitution.
The 2010 ruling overturned the ban, determining it to be a violation of the civil rights of gays and lesbians.