In a brutally frank series of exchanges with activists behind closed doors at the party conference, he conceded it had been a political error to have forced the contentious legislation through Parliament.
The Prime Minister said that although he remained a committed supporter of gay marriage, he regretted the uproar the policy had caused in the Parliamentary and voluntary party. He admitted he had under-estimated the scale of the opposition from his own supporters and the Church.
One association chairman who attended the meeting but declined to be named said: ‘Cameron was repeatedly and often forcefully challenged over gay marriage. He said he still believed that gay marriage was right but regretted the way he had forced it through Parliament.
‘He was effectively saying he wished he had left it well alone. We wished he had too.’
Another constituency chairman said: ‘Feelings were running very high. We told him that we were losing good members to Ukip over gay marriage which was when he did his mea culpa. The trouble, is the damage is already done as I’ve lost dozens of members from my association.’
Mr Cameron was politely applauded when he revealed his regret over the policy.
One Cabinet minister, who was at the conference, said: ‘It’s true he wishes he had never done it. He has been saying this is the biggest political mistake of his premiership because he totally underestimated the trouble it would cause.
‘There’s no doubt Cameron genuinely believes in the policy and passionately believes in equality in marriage. But he regrets the unhappiness and dissent it has caused among his MPs and the voluntary party.’
In the Commons vote earlier this year, 136 Tory MPs out of a total of 303 voted against changing the historic definition of marriage and dozens more abstained.
The rebellion, one of the most serious ever suffered by a Conservative Prime Minister, would have been even greater if ministers and their parliamentary aides had not been leant on to support the Prime Minister.
Mr Cameron’s admission that he got it wrong will infuriate Tory MPs and party officials who begged him not to press ahead with the policy, which is the biggest factor in the catastrophic fall in party membership.
The Daily Mail revealed earlier this year that it had fallen to 134,000 – a drop of more than half since Mr Cameron became leader in 2005. Thousands of activists have cited gay marriage as their reason for refusing to renew their subscriptions.
The revolt even spread to Mr Cameron’s own true-blue Witney constituency when Cicely Maunder, 64, a branch chairman, resigned from the party.
‘I left after 34 years because of David Cameron’s support for gay marriage,’ she said.
Sir Gerald Howarth, the Tory MP for Aldershot, said: ‘This has caused immense difficulty and distress for many of my colleagues, some of whom were pressured into voting for it.
‘Gay marriage will have an enduring affect on our support and our membership. I have lost members. I know of one colleague who says she has lost 25 per cent of her members over this one issue.’
In the private session, Mr Cameron also revealed he wishes he had not abused Ukip members as ‘a bunch of loonies, fruit cakes and closet racists’.
Lynton Crosby, the Australian strategist who masterminded Boris Johnson’s London mayoral campaigns and now works for Mr Cameron, has urged him to move on from issues such as gay marriage to concentrate on immigration, the economy and Europe.
Michael Heseltine last night branded Ukip ‘racists’ and warned the Tories to abandon any thought of an electoral deal.
The former Deputy Prime Minister compared Ukip’s appeal to that of Enoch Powell and his infamous ‘rivers of blood’ speech, as well as to the former French National Front leader Jean-Marie le Pen.
Lord Heseltine said that any attempt to come to an electoral arrangement with Ukip would cost the Tories the centre-ground votes they needed to win a general election.
‘Beware of what happens to your pivotal vote in the centre ground,’ he said. ‘You always have these right-wing, racist operations pandering to the lowest common denominator in politics. That is what happens.’
Asked he if was saying Ukip was racist, he replied: ‘Of course it is racist. Who doubts that? The language, the rhetoric, the membership – who doubts it?’
Ukip described the comments as ‘baseless and repugnant’.