Gay rights activists hailed the legislation in the largely conservative EU member state, which is strongly influenced by the powerful Roman Catholic Church.
"Croatia made a historic step forward to stand along progressive countries which have already resolved the issue," Iva Tomecic, editor-in-chief of lesbian, gay, bisexual and transgender (LGBT) news portal CroL, told AFP.
"From now on same sex couples and families can finally legally regulate their unions... knowing that the country where they live, work and pay taxes is treating them as equal citizens," she said.
A total of 95 MPs in the 151-member parliament voted for the law and 10 abstained, but none voted against.
In a referendum sought by a Church-backed group, Croatians voted last year to amend the constitution to include a definition of marriage as a "union between a woman and a man".
However Prime Minister Zoran Milanovic's centre-left government pledged to improve gay rights and adopted a bill enabling homosexual couples to register as "life partners".
The "In the Name of the Family" group that initiated the referendum slammed the new law as being "against honesty, basic democratic rules and Croatia's constitution".
"This ideological law will fail," it said in a statement.
- 'Significant improvements' -
In the small nation of 4.2 million where almost 90 percent of population is Roman Catholic, attitudes towards gay rights have gradually become more liberal even before Croatia joined the EU last July as its newest member.
During its first Gay Pride parade in Zagreb in 2002, dozens of participants were beaten up by extremists.
But gay rights marches are now staged regularly, although still under heavy security.
The issue is also discussed more openly in the media, while public support for the fight for equality is growing.
"Since the first pride, significant improvements in almost all aspects for LGBT people are seen and we managed to bring our problems closer to the wider public," writer and activist Gordan Duhacek told AFP.
Ivo and Mladen were waiting impatiently for the law to be adopted, planning to register next year so that "everyone has time to prepare for the wedding".
"This is one of the most important moves by this government for the whole of society," Ivo, a 32-year-old biochemist, told AFP.
The law would help to root out homophobia in Croatia by pushing for greater acceptance of gays by society in general, he added.
"As always, it (life partnerships) will start with a few people... and people will gradually get used it," he said, declining to reveal his last name.
But his 33-year-old partner Mladen warned that many gays would refrain from registering to avoid situations where they might unavoidably have to come out in the workplace.
More than half of gays in Croatia -- 53 percent -- would like to marry while more than a third would like to have children, according to a survey published in November by the Zagreb Pride gay rights group.