It means the UK may not now leave on 29 March as previously planned.
But some Labour frontbenchers resigned to defy party orders to abstain on a vote on holding another referendum.
Shadow housing minister Yvonne Fovargue, shadow education minister Emma Lewell-Buck, shadow business minister Justin Madders, Ruth Smeeth, a shadow ministerial aide, and Labour whip Stephanie Peacock, all quit their roles to oppose one.
Downing Street said the government was still preparing for a no-deal Brexit.
Theresa May is planning to hold another “meaningful vote” on her withdrawal deal by Wednesday – after it was overwhelmingly rejected on two previous occasions.
And it would be for the leaders of those states “to consider such a request, giving priority to the need to ensure the functioning of the EU institutions and taking into account the reasons for and duration of a possible extension”.
It is still technically possible that we could leave the EU at the end of this month – the law has not changed.
But politically it is now almost entirely out of reach.
The prime minister is accepting she will miss one of the biggest targets she has ever set herself.
Tonight’s vote is awkward for another reason, as it again displays the Conservatives’ fundamental divisions.
This is more than a quarrel among friends, but a party that is split down the middle on one of the most vital questions this administration has posed, with cabinet ministers, as well as backbench Brexiteers, lining up to disagree with Theresa May.
Downing Street said this was a “natural consequence” of Mrs May’s decision to offer a free vote on an issue where there are “strong views on all sides of the debate”.
Chief Secretary to the Treasury Liz Truss tweeted: “I voted against a delay to Brexit. As a delay was passed by Parliament, I want to see deal agreed ASAP so we can minimise to short, technical, extension.”
Seven cabinet ministers – Ms Truss, Brexit Secretary Stephen Barclay, International Trade Secretary Liam Fox, International Development Secretary Penny Mordaunt, Commons leader Andrea Leadsom, Transport Secretary Chris Grayling and Defence Secretary Gavin Williamson – voted against the government motion.
Health Secretary Matthew Hancock said it would be “extremely difficult” but “still possible to deliver Brexit on 29 March with a deal”.
He said: “Today I reiterate my conviction that a deal can be agreed based on our alternative plan that can command support across the House.
“I also reiterate our support for a People’s Vote – not as a political point-scoring exercise but as a realistic option to break the deadlock.”
Among frontbenchers to quit over the issue, Ms Peacock said: “It is with deep regret I tonight resigned from Labour’s front bench, because I believe we should respect the result of the 2016 vote to leave the European Union.”