MPs voted by 432 votes to 202 to reject the deal, which sets out the terms of Britain's exit from the EU on 29 March.
Labour leader Jeremy Corbyn has now tabled a vote of no confidence in the government, which could trigger a general election.
The confidence vote is expected to be held at about 1900 GMT on Wednesday.
The defeat is a huge blow for Mrs May - who has spent more than two years hammering out a deal with the EU.
The plan was aimed at bringing about an orderly departure from the EU on 29 March, and setting up a 21-month transition period to negotiate a free trade deal.
The UK is still on course to leave on 29 March but the defeat throws the manner of that departure - and the timing of it - into further doubt.
MPs who want either a further referendum, a softer version of the Brexit proposed by Mrs May, to stop Brexit altogether or to leave without a deal, will ramp up their efforts to get what they want, as a weakened PM offered to listen to their arguments.
The Brexit debate has cut across traditional party lines.
Some 118 Conservative MPs - from both the Leave and Remain wings of her party - voted with the opposition parties against Mrs May's deal.
And three Labour MPs supported the prime minister's deal: Ian Austin (Dudley North), Kevin Barron (Rother Valley) and John Mann (Bassetlaw).
In normal times, such a crushing defeat on a key piece of government legislation would be expected to be followed by a prime ministerial resignation.
But Mrs May signalled her intention to carry on in a statement immediately after the vote.
"The House has spoken and this government will listen," she told MPs.
She offered cross-party talks to determine a way forward on Brexit, if she succeeded in winning the confidence vote.
Former foreign secretary and leading Brexiteer Boris Johnson said it was a "bigger defeat than people have been expecting" - and it meant Mrs May's deal was now "dead".
But he said it gave the prime minister a "massive mandate to go back to Brussels" to negotiate a better deal, without the controversial Northern Ireland backstop.
And he said he would back Mrs May in Wednesday's confidence vote.