Gay couples would be allowed to marry in churches under plans due to be unveiled by the Government next week.
The decision represents a major u-turn on the position set out in a formal Government consultation earlier this year which proposed a blanket ban.
It raises the prospect of a major battle between church and state over the issue as well as a massive backbench rebellion with at least 130 Conservatives set to vote against the proposals.
The plans will be announced by the Culture Secretary Maria Miller next week and a detailed bill is expected to be put before Parliament next month.
That could see the redefinition of marriage sped through the Commons before the summer.
The shift in policy came after Government lawyers came up with plans for “multiple lock” legal protections for churches, mosques and synagogues which do not want to marry gay couples on grounds of belief.
David Cameron said: “I’m a massive supporter of marriage and I don’t want gay people to be excluded from a great institution.
“But let me be absolutely one hundred per cent clear, if there is any church or any synagogue or any mosque that doesn’t want to have a gay marriage it will not, absolutely must not, be forced to hold it.
“That is absolutely clear in the legislation.
“Also let me make clear, this is a free vote for Members of Parliament but personally I will be supporting it.”
Opponents believe that no safeguard will be able to protect them from a legal challenge at the European Court of Human Rights, which would force them to marry gay couples.
The official consultation document published in March said: “The Government is not seeking to change how religious organisations define religious marriage and any subsequent legislation would be clear that no religious organisation could conduct a religious marriage ceremony on religious premises for same-sex couples.”
But now the proposals are expected to be modelled on arrangements already in place for civil partnerships.
When they were first introduced by Tony Blair they were to be conducted solely by civil registrars.
But the Coalition recently changed the law to allow those religious groups which want to conduct civil partnership ceremonies to do so.
It means that the Church of England could only ever perform civil partnerships if the General Synod gives its approval.
But other churches including the Unitarians have already begun carrying them out, with their own ministers acting as civil registrars.
But opponents condemned the u-turn as a broken promise.
Colin Hart, Campaign Director for the Coalition for Marriage said: “The decision to press ahead with the profoundly undemocratic proposals to rewrite the traditional meaning of marriage is deeply disappointing and regrettable.
“What is even more alarming is the PM has gone back on his promises that Churches will be protected. The suggestion that by creating an ‘opt in system’ you somehow prevent churches, mosques and synagogues being sued is risible. This is now made much more likely.
“Any legislation that the PM proposes will be subject to the European Courts, who according to legal experts will find against the Government and those religious institutions who end up in the dock.
“So the PM is writing a cheque that he knows will bounce.”
But Rabbi Dr Jonathan Romain, a leading rabbi of the Movement for Reform Judaism, who was among those calling for the Government to reconsider, welcomed the change.
“This is not only very welcome and but is essential for religious integrity,” he said.
“I cannot conceive of a God who creates homosexuals but would then want us to deny them the right to seek marital fulfilment within a religious context.”
“I think the Government has been quite surprised by the willingness of religious groups for this.
“Somebody somewhere in the Home Office made an error in lumping all religious groups in the same category without thinking that there are different stances.”
The Church of England and the Roman Catholic Church have both thrown their weight behind the campaign against gay marriage.
But the Quakers and Unitarians as well as both the Liberal and reform branches of Judaism support same-sex marriage.
Benjamin Cohen, of Out4Marriage, campaign said: “We’re delighted to hear that the Government will be legislating to introduce full equal marriage including same-sex marriages solemnised by religious ministers.
“The Prime Minister and Deputy Prime Minister both told us during the summer that such a move had their personal support.
“We’re glad that this personal support is being translated into Government action.
“Legislation must give individual religious organisations the freedom to decide for themselves whether to hold same-sex marriages. None should be forced to, but those that wish to must be given the rights to do so.”