Leaders of the Episcopal Church, the Anglican province in the United States, insisted they were still committed to membership in the Anglican Communion. Some Anglican leaders, however, predicted the vote would break their fellowship.
The Episcopal General Convention, meeting in Anaheim, California, gave final approval to the measure during their once-every-three-years legislative assembly, which runs through Friday.
"God has called and may call" gays in committed relationships to "any ordained ministry" in the church, the resolution says.
Lay people voted 78-21 and clergy voted 77-19 to approve the measure. The House of Bishops had earlier voted 99-45 to adopt the statement. In the debates, delegates said they worried about the reaction of other Anglicans, but felt a duty to vote yes.
"I personally believe we had to do this," said John Cheek, a delegate from the Diocese of Western Massachusetts, based in Springfield. "It's the way we see the Gospel."
Episcopalians caused an uproar in 2003 by consecrating the first openly gay bishop, V. Gene Robinson of New Hampshire. Since then, Archbishop of Canterbury Rowan Williams, the Anglican spiritual leader, has struggled to prevent a permanent Anglican split.
Last month, breakaway Episcopal conservatives and other like-minded traditionalists formed a rival national province to the Episcopal Church called the Anglican Church in North America.
The new body includes four seceding Episcopal dioceses and is supported by several overseas Anglican leaders who have broken ties with the Episcopal Church.
The 77 million-member communion is the third-largest grouping of churches worldwide, behind the Roman Catholic and Orthodox Christian churches.
Williams attended the convention in its opening days last week, telling delegates, "I hope and pray that there won't be decisions in the coming days that could push us further apart."
To ease tensions with overseas Anglicans, the Episcopal General Convention three years ago passed a resolution that urged restraint by dioceses considering gay candidates for bishop.
The latest statement is widely viewed by advocates for gay clergy, theological conservatives and others in the Anglican world as repealing that pledge.
The Episcopal gay advocacy group Integrity said in a statement that the declaration "effectively ends" the temporary prohibition on gay bishops. Robinson, in a post on his diocesan blog, acknowledged the risk the bishops' took in adopting the measure.
"No doubt, they will pay a price for opening their hearts, much as gay and lesbian people in this church have paid a price for their exclusion," Robinson wrote. "I applaud them for their courage and will stand with them in the consequences of their vote."
The few traditional Episcopalians who attended the convention said they were there to express the conservative view, but had largely resigned themselves to the liberal direction of the denomination, which has about 2.3 million members.
"If you think you're going to convince the Episcopal Church, you're smoking something funny," said Bishop Peter Beckwith, a theological conservative from the Diocese of Springfield, Illinois. "That's unrealistic, but we're still called to be faithful."
Episcopalians and Anglicans have been debating for decades how to interpret the Bible on issues from salvation to homosexuality. Traditionalists believe Scripture bans same-gender relationships, while liberals emphasize the Bible's social justice teachings on tolerance.
Church of England Bishop N.T. Wright, a prominent Anglican scholar, wrote in an op-ed in The Times of London, that this week's vote "marks a clear break with the rest of the Anglican Communion" and formalizes the Anglican schism.
When Williams learned that the latest statement was heading toward approval, he told British reporters that he "regrets" the move.