The Church of England and Church in Wales will be banned in law from offering same-sex marriages, the government has announced.
Other religious organisations will be able to "opt in" to holding ceremonies, Culture Secretary Maria Miller said.
But she added that the Church of England and Church in Wales had "explicitly" stated strong opposition and would not be included.
Labour said the exemption for the established Church was "disappointing".
The plans are due to be introduced before the next election, in 2015.
Labour backs the government's decision to legislate on same-sex marriages, which will apply to England and Wales, and urged ministers not to be "too reserved" in promoting the policy.
Party leader Ed Miliband suggested that Labour votes would "ensure that this measure is passed in the House of Commons".
The Church of England and Roman Catholics, among other denominations, have voiced opposition to same-sex marriage and are expected to oppose the bill, even with its caveats.
But some religious groups, including Quakers, Unitarians and Liberal Judaism, are in favour.
In her statement, Mrs Miller promised a "quadruple lock" to protect religious freedom, involving:
- No religious organisation or individual minister being compelled to marry same-sex couples or to permit this to happen on their premises
- Making it unlawful for religious organisations or their ministers to marry same-sex couples unless their organisation's governing body has expressly opted in to provisions for doing so
- Amending the 2010 Equality Act to ensure no discrimination claim can be brought against religious organisations or individual ministers for refusing to marry a same-sex couple
- The legislation explicitly stating that it will be illegal for the Church of England and the Church in Wales to marry same-sex couples and that Canon Law, which bans same-sex weddings, will continue to apply
Mrs Miller said the Church of England and Church in Wales had "explicitly stated" their opposition to offering same-sex ceremonies, so the government would "explicitly state that it will be illegal for the Churches of England and Wales to marry same-sex couples".
She also said: "I am absolutely clear that no religious organisation will ever be forced to conduct marriages for same-sex couples, and I would not bring in a bill which would allow that.
"European law already puts religious freedoms beyond doubt, and we will go even further by bringing in an additional 'quadruple legal lock'. But it is also a key aspect of religious freedom that those bodies who want to opt in should be able to do so."
For Labour, shadow home secretary Yvette Cooper, welcomed the announcement, saying: "We should not stop people from getting married and getting that recognition from the state on grounds of gender or sexuality.
"And we should not here in Parliament say that some loving relationships have greater value than others."
Plans to legalise same-sex marriage have divided the Conservative Party and more than 100 Tory MPs are thought to be against the idea.
One of these opponents, Peter Bone, asked the Commons: "How dare the secretary of state try to redefine marriage?"
Richard Drax said: "I would like to ask the Secretary of State and the government what right have they got, other than arrogance and intolerance, to stamp their legislative boot on religious faith?"
Another, Sir Tony Baldry, who speaks for the Church of England in Parliament, said: "For the Church of England, the uniqueness of marriage is that it does embody the distinctiveness of men and women.
"So removing from the definition of marriage this complementarity is to lose any social institution where sexual difference is explicitly acknowledged."
The Catholic Church stepped up its opposition, accusing ministers of ignoring a 600,000-signature petition supporting the status quo.
Archbishop Vincent Nichols, the leader of the Roman Catholic Church in England and Wales, and Archbishop Peter Smith, the Archbishop of Southwark, said opponents of gay marriage should lobby MPs "clearly, calmly and forcefully, and without impugning the motives of others".
In a statement, they said: "The meaning of marriage matters. It derives that meaning from its function as the foundation of the family.
"The union of one man and one woman for love and mutual support and open to procreation has over the centuries formed a stable unit we call the family."
But the Archbishop of Wales said that making it illegal for the Church in Wales to offer same-sex marriages would be a "step too far".
"In my personal opinion it's a great pity it's illegal for us not to even have the possibility to do it," said Dr Barry Morgan. "It should be left for us to opt in or opt out."
The Bishop of Leicester, the right reverend Tim Stevens, warned the issue was creating a division between the political classes and practising religious people.
He spoke out against the government's proposals in the House of Lords and said ministers needed to work towards a consensus on the matter.
But former bishop of Oxford, Lord Harries of Pentregarth, said in response that a "fair number" of serving bishops supported gay marriage but were unable to say so publicly.
Prime Minister David Cameron said last week that he believed same-sex marriages should be allowed in churches - but only if there was a "100%" guarantee that no church, synagogue or mosque would be forced to hold one against their wishes.
A number of other senior Tories, including Education Secretary Michael Gove, London Mayor Boris Johnson and former Prime Minister John Major, have also backed same-sex marriage by religious bodies.
Ben Summerskill, chief executive of the gay rights organisation Stonewall, said: "We're delighted about the government's statement today and welcome the promise to legislate for equal marriage as warmly as on the three previous occasions that this announcement has been made.
"We're particularly pleased that ministers have been persuaded to extend their original proposal in order to permit same-sex marriages for those religious denominations that wish to hold them. This is an important matter of religious freedom."
'Husband' and 'wife'
The consultation on plans for same-sex marriage received 228,000 submissions.
In its response to the consultation the government says it has no plans to change the definition of adultery or non-consummation of a marriage - which means neither could be cited as grounds for divorce in a same-sex marriage, unless the adultery was with someone of the opposite sex.
They also dismiss the fear that the terms "husband" and "wife" could be removed as a result of same sex marriages.
The government says: "That is not the case - on the contrary these proposals will allow more people to use those terms.
"Couples will continue to be able call each other whatever they wish in their personal life, and in legal and official documents, the terms husband and wife will continue to be used."
They also say that teachers "particularly in faith schools will be able to continue to describe their belief that marriage is between a man and woman whilst acknowledging and acting within the new legislative position which enables same sex-couples to get married".