Democratic Gov. Neil Abercrombie's office said he intends to sign the bill within 10 days, and civil unions would begin Jan. 1, 2012.
"I have always believed that civil unions respect our diversity, protect people's privacy, and reinforce our core values of equality and aloha," Abercrombie said in a statement released minutes after Wednesday's vote. "For me, this bill represents equal rights for all the people of Hawaii."
The Senate's 18-5 vote came after years of thousands-strong rallies, election battles and passionate public testimony on an issue that has divided the Rainbow State for nearly two decades.
The measure grants gay and lesbian couples the same rights and benefits the state provides to married couples.
Hawaii would become the seventh state to grant essentially the same rights of marriage to same-sex couples without authorizing marriage itself.
Five states and the District of Columbia permit same-sex marriage.
The anxiously awaited civil unions vote came immediately after the Senate confirmed the state's first openly gay Supreme Court justice, Sabrina McKenna.
Gay rights advocates praised the vote as a victory for equal rights in a state known for its diversity and tolerance.
Opponents of the measure, many of them Christians, said civil unions erode the concept of the traditional family and could lead to same-sex marriage.
The Hawaii Legislature also passed a similar civil unions bill last year, but it was vetoed by then-Gov. Linda Lingle, a Republican. She was term-limited from running for election again in November.
Abercrombie said Wednesday that the Legislature's approval marked an end to an "emotional process" for the state, which has been a battleground in the gay rights movement since a 1993 state Supreme Court decision that nearly legalized gay marriage.
The ruling would have made Hawaii the first state to allow same-sex couples to wed, but it didn't take effect while voters were given a chance to decide.
They responded five years later by overwhelmingly passing the nation's first "defense of marriage" constitutional amendment, approved by 69 percent of voters who gave the Legislature the power to reserve marriage to opposite-sex couples.
The amendment resulted in a law banning gay marriage in Hawaii but left the door open for civil unions.
Since then, 29 other states also have enacted defense of marriage amendments.