A three-judge panel of the 10th U.S. Circuit Court of Appeals in Denver found that Utah's ban on same-sex marriage violates the U.S.Constitution. The judges upheld a lower court ruling that struck down the ban in December.
They immediately put their ruling on holding so it could be appealed.
The case has been closely watched because it represents the first ruling on gay marriage at the appellate level since the U.S. Supreme Court struck down the Defense of Marriage Act in June 2013.
The ruling likely will be appealed to the Supreme Court. The panel has not yet ruled on a similar ban in Oklahoma.
In a separate ruling on Wednesday, U.S. District Judge Richard Young ruled that Indiana's ban on gay marriage violates the U.S. Constitution's equal-protection clause in a mixed ruling involving lawsuits from several gay couples.
It wasn't immediately clear whether the ruling means same-sex marriages can begin in the state.
The Indiana attorney general's office says it will appeal.
Federal courts across the country have struck down gay marriage bans recently, but many of those rulings are on hold pending appeal. Attorneys on both sides of the issue expect the matter to eventually land before the U.S. Supreme Court.
It also wasn't immediately clear what impact Wednesday's ruling might have on a faltering movement to add a gay marriage ban into the Indiana Constitution.
—By The Associated Press. CNBC.com contributed to this story.