Only 127 of the 303 Tory MPs voted in favour, with 136 voting against the Bill, including two cabinet ministers, and 40 abstaining.
The prime minister, who did not attend the debate despite being the driving force behind the Bill, said in a statement that allowing gay people to marry would "make our society stronger".
"Equal marriage builds on Labour’s successes in government which include the repeal of Section 28, equalising the age of consent, the introduction of civil partnerships and changes to the rules governing adoption," he said.
For much of the seven hour parliamentary debate on Tuesday afternoon, Tory MPs, who were granted a free vote on the issue, stood to savage the Bill backed by Mr Cameron.
North Thanet MP Roger Gale said for the coalition to attempt to introduce gay marriage was "Alice in Wonderland territory" and "Orwellian".
Former defence minister Sir Gerald Howarth said it was “simply wrong" and attacked the "equality mantra" behind the Bill. "It has caused deep and needless divisions within the Conservative Party. There is no mandate for it," he said
Gainsborough MP Edward Leigh, much to the confusion of many, said he feared the "merciless prism of equality" that was behind the Bill.
"We should be concerned with equality, but not at the expense of every other consideration, not at the expense of tradition,” he said.
And Peterborough MP Stewart Jackson said Christians would suffer from a “hierarchy of rights” that valued gay marriage above freedom of religion.
"This is a Pandora’s box of endless litigation, for division of society setting one group against another," he added.
However the Commons also heard from many Tory MPs who passionately urged their colleagues to vote in favour of same-sex marriage.
Former police minister Nick Herbert said millions of people were watching the debate. "I know that the signal we send today about whether the law fully recognises the place of gay people in our society will really matter,” he said.
"Above all, I think of two people, faithful and loving, who simply want their commitment to be recognised, as it is for straight couples, and that in the end is what this bill is about."
And Totnes MP Sarah Wollaston said the measure was "well overdue" and that "homosexuality is not forbidden love".
"It’s time this House recognized that. And actually recognized you cannot be a little bit equal. This matters," she said.
Wollaston warned of the negative message MPs would "send around the world if we don’t accept and celebrate people who are homosexual and vote for love and equality".
Introducing the Bill, equalities minister Maria Miller said the "depth of feeling, love and commitment between same-sex couples is no different from that depth of feeling between opposite-sex couples".
"The Bill enables society to recognise that commitment in the same way, too, through marriage. Parliament should value people equally in the law, and enabling same-sex couples to marry removes the current differentiation and distinction," she said.
And there was often more in common between Miller and her Labour shadow Yvette Cooper than there was between the minister and her own backbenchers - and it was the alliance that ensured the passage of the Bill.
"We have discriminated for too long," Cooper told MPs. "In marriage let us celebrate, not discriminate. Let us be on the right side of history."
She added: "If marriage is to stay relevant, to stay important and to remain a crucial part of our family and social relationships, it also has to remain in tune with the values of every generation, and that means that it should keep up with rightly changing attitudes towards homosexuality. The truth is that gay and lesbian couples have been locked out of too much for too long."
Tory supporters of the Bill were joined by the majority of the Labour benches, including Tottenham MP David Lammy who attacked the idea homosexual and heterosexual people could be "separate but equal".
“Separate but equal are the words that justified sending black children to different schools than their white peers,” he said. “It is an expert from the phrase book of the segregationist and the racist.
“It is the same statement, the same ideas and the same delusion that we borrowed in this country to say that women could vote but only if they were married and only when they were over 30.
"Separate is not equal, so let us be rid of it. As long as there is one rule for us and another for them we allow the barriers of acceptance to go unchallenged. As long as our statute book suggests love between two men or two women is unworthy of being recongised through marriage we allow the rot of homophobia to fester."
Labour overwhelmingly supported the legislation, however some of Ed Miliband’s MPs also spoke out against letting same-sex couples wed.
Robert Flello, Labour MP for Stoke-on-Trent said he would be opposing the Bill and civil partnerships were equal to marriage already.
"True Christians are not bigoted and this is actually not a matter of equality, no matter how often it is referred to as equal marriage. Civil partnerships are equal to marriage - they might not have the same name but they are equal," he said.
The Bill will now be examined in detail by the House of Commons and the House of Lords.
Suggested For You
SUBSCRIBE AND FOLLOW
Get top stories and blog posts emailed to me each day. Newsletters may offer personalized content or advertisements.Learn more