MPs voted 321 to 299 in support on an amendment by Dominic Grieve, a Conservative MP.
The UK government may have broken Parliamentary rules by not publishing Brexit legal advice, the Commons Speaker has said.
"We have tested the opinion of the House twice on this very serious subject", Andrea Leadsom, the leader of the House of Commons said after the vote took place.
"What we break now may be very hard to fix later", Leadsom said.
"It is of huge constitutional and political significance", Keir Starmer, the Opposition Labour Party's Brexit spokesman, said after the vote.
Meanwhile, Mr Carney told the Commons Treasury Committee that increased tariff prices, import costs and a collapse in the value of the pound after a no-deal Brexit would send food prices soaring "quite quickly".
The ECJ's advocate general Manuel Campos Sanchez-Bordona said the United Kingdom could withdraw its notification to leave the European Union before its exit in March 2019 without needing the approval of the other 27 states.
"That possibility continues to exist until the withdrawal agreement is formally concluded", the court added.
Downing Street reaffirmed on Tuesday that May has absolutely no intention of doing so - and that the ruling was in either case only advisory.
Kanye West apologizes for using phone during Cher musical
But Spector was perfectly within his rights to call out a rude audience member. You are never allowed on your phone at a broadway show.
"This is a huge win for us, and a huge step forward from the highest court in the business, and confirms what we have been hoping for: that the United Kingdom can indeed change its mind on Brexit and revoke Article 50, unilaterally", he said.
Scottish MEP Alyn Smith who, along with other politicians from a range of parties, launched the legal proceedings in December a year ago, said the legal opinion showed that the "Brexit clock" could be stopped.
More than two years after it voted to leave, the testy debates that shaped the referendum have intensified, dividing Britain and unsettling markets, businesses and foreign residents.
The governing Conservative Party and the main opposition party, Labour, are internally divided on how Brexit should proceed.
She has also been constantly challenged by hardline eurosceptics in her own party and might face an internal leadership contest as well.
In the most extreme no-deal scenario, shopping bills could rise by up to 10% but even in an orderly no-deal withdrawal, with a transition period, grocery prices could rise by 6%, he said.
Many of May's critics want her to go back and renegotiate.
Defeat for May could make it more likely that Britain will hold a second referendum on exiting the European Union - which would nearly certainly require it at least to defer its departure - three years after voting narrowly to leave.
It also sets out the rights of European Union expatriates and plans for a post-Brexit transition period lasting to December 2020. I have faced fierce criticism from both sides.
May's opponents argue that Britain can renegotiate the deal for better terms.
May insists this is necessary to avoid border checks in Ireland.