All 37 Democratic members and two of the chamber's 28 Republicans voted for the bill, which had already been approved in the state Senate and is scheduled to take effect May 1 after Gov. John Hickenlooper signs it, The Denver Post reported.
Republican Rep. Lori Saine warned the bill will face a legal challenge because it does not contain religious exemptions. Republicans failed to win approval for amendments to add a conscience clause and to put the matter to Colorado voters.
Enactment of the bill makes Colorado the 18th state to recognize either marriage or civil unions for same-sex couples, the gay rights advocacy group One Colorado said.
Democratic Speaker Mark Ferrandino, who is gay, said Colorado needed to "make laws in our society that respect everyone equally."
Rep. Cheri Gerous, one of the two Republicans who voted in favor of the bill, said she expects she will pay a political price for her vote but she said it was the right thing to do, the Post reported.
"I'm a Republican and a conservative and I like this bill," she said.
Rep. Paul Rosenthal of Denver, a gay Democrat, said the bill's implications go well beyond the state's borders.
"There are countries like Uganda that is considering a death penalty for gays, like Iran that have executed gays," Rosenthal said. "Let's send a message today that we love all of our citizens, appreciate all of our citizens, and we will treat them equal under the law."