Prime Minister David Cameron wants churches in England and Wales to be allowed to conduct same-sex marriage ceremonies.
He said he did not want gay people to be "excluded from a great institution", but would not force any groups to hold ceremonies in their places of worship.
Ministers will reveal their response to a consultation next week. MPs will be given a free vote on the issue.
The move has angered some Tory MPs who have opposed the change in the law.
Bob Blackman, MP for Harrow East, warned there will be "outrage throughout the country" and a "clear backlash" against David Cameron's proposals.
'Arrogant Cameron'
He told BBC News: "Marriage is between one man and one woman and so changes to the definition of marriage are not appreciated and not strongly supported."
He said he was against teachers "being forced to say same sex relationships are the equivalent of heterosexual relationships" - something he said would happen if the move become law.
Even if churches and other places of worship were allowed to refuse to marry gay couples they could face legal challenges, said the Conservative MP.
The move is likely to get through the House of Commons, as it supported by most Labour, Lib Dem and Conservative MPs, but Mr Blackman predicted it could face "an interesting challenge" in the House of Lords.
Conservative MP Stewart Jackson tweeted: "Gay marriage bill will be massacred in the Lords and govt can't use Parliament Act as it wasn't in manifesto. Arrogant Cameron knows best."
But Mr 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 100% 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."
'Religious freedom'
The government's initial consultation document said it would not be possible for a same-sex couple to get married in church and other religious premises.
Under the new proposals, religious organisations which do not want to host same-sex weddings will be given an absolute guarantee they will not be forced to do so.
But Whitehall sources say the best way to make the guarantee "water-tight" is to allow religions to opt in to hosting same-sex ceremonies if they want to.
Labour leader Ed Miliband and deputy prime minister Nick Clegg also support gay marriage in church.
Mr Clegg said: "It's very important to remember that in our plans we're not going to force any church or any religious denomination to hold same-sex marriage ceremonies if they don't want to but I do think it's time that we allow any couple, no matter who they are, to marry if that's what they want to do."
The Church of England and Roman Catholics, among other denominations, have voiced opposition to same-sex marriage.
But some religious groups, including Quakers, Unitarians and Liberal Judaism, are in favour of gay marriage and are thought likely to apply to be allowed to stage ceremonies.
Paul Parker, recording clerk for Quakers in Britain, said: "For Quakers, this is an issue of religious freedom and we don't seek to impose this on others."
'Deeply disappointing'
Benjamin Cohen, of Out4Marriage, which backs same-sex weddings, said he was "delighted" by Mr Cameron's announcement.
"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."
Colin Hart, campaign director for the Coalition For Marriage, which opposes same-sex 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."