Chief U.S. District Judge Vaughn Walker will issue his ruling Wednesday afternoon, court spokeswoman Lynn Fuller said.
His verdict comes in a lawsuit brought by two same-sex couples and the city of San Francisco seeking to overturn California's voter-approved Proposition 8, which outlawed gay marriage five months after the state Supreme Court legalized it.
Both sides previously said an appeal was certain if Walker did not rule in their favor. The case would go first to the 9th U.S. Circuit Court of Appeals then the Supreme Court if the high court justices agree to review it.
Anticipating such a scenario, lawyers for the coalition of religious and conservative groups that sponsored Proposition 8 in 2008 filed a legal brief Tuesday asking Walker to stay his decision if he overturns the ban so same-sex couples could not marry while an appeal was pending.
"Same-sex marriages would be licensed under a cloud of uncertainty, and should proponents succeed on appeal, any such marriages would be invalid," they wrote.
Walker presided over a 13-day trial earlier this year that was the first in federal court to examine if states can prohibit gays from getting married without unlawfully infringing on their civil rights.
Supporters argued the ban was necessary to safeguard the traditional understanding of marriage and to encourage responsible childbearing.
Opponents said that tradition or fears of harm to heterosexual unions were legally insufficient grounds to discriminate against gay couples.