Lawmakers voted by 326 to 290 in favour of backing the EU Withdrawal Bill, which will now go forward for further scrutiny by MPs.
The bill is aimed at overturning the 1972 European Communities Act, which took the UK into the then European Economic Community (EEC).
It will convert all existing EU laws into UK law to ensure there are no gaps in legislation on Brexit day, scheduled for March, 2019.
"Although there is more to do, this decision means we can move on with negotiations with solid foundations and we continue to encourage MPs from all parts of the UK to work together in support of this vital piece of legislation,"May said at the end of the tough vote.
More From This Section
Tory party backbenchers have warned May that their support on the bill, which will end the supremacy of EU law in the UK, is not unconditional and have demanded a series of amendments to the bill as it progresses to the next stage in the parliamentary process before becoming law.
The government claims it needs the power to be able to make minor technical changes to ensure a smooth transition.
"The House of Commons has rightly backed this crucial piece of legislation, giving its support to an orderly exit and helping to provide certainty to businesses, organisations and individuals up and down the country," said Steve Baker, junior minister in the UK's Department for Exiting the European Union (EU).
However, those opposed to the bill fear it gives ministers the power to make changes to laws during the process without consulting MPs.
"Labour will seek to amend and remove the worst aspects from the bill but the flaws are so fundamental it's hard to see how this could ever be made fit for purpose," the Labour MP said.
His party had largely decided to vote against the bill but seven of Labour's MPs defied party leader Jeremy Corbyn to back the government on the bill, saying it supports the will of the British people who voted for Brexit in the June 2016 referendum.
The Liberal Democrat Brexit spokesperson, Tom Brake, said MPs who backed the bill should feel "ashamed".
"This is a dark day for the mother of parliaments," he said.
MPs also voted on Tuesday in favour of the government's proposed timetable for debating Brexit legislation - by 318 votes to 301 - guaranteeing 64 hours of debate over eight days.
Both votes came as the UK government released it latest paper on Brexit strategy, which proposes to continue contributing troops and military assets to EU operations after Brexit as part of closer defence cooperation with the economic bloc.
"After we leave the European Union we will continue to face shared threats to our security, our shared values and our way of life," said UK Brexit minister David Davis.
"It's in our mutual interest to work closely with the EU and its member states to challenge terrorism and extremism, illegal migration, cyber crime, and conventional state-based military aggression," he said.
It is the sixth position paper by the UK government in its talks with Brussels and hopes to push the EU towards opening negotiations on the future of UK-EU relations post- Brexit.