In a joint statement, Mrs May, German Chancellor Angela Merkel and French President Emmanuel Macron said the decision was a matter of “regret and concern” and said they remained committed to the deal.
The US president said he would impose the “highest level” of economic sanctions on Iran as he claimed the state was on the brink of acquiring nuclear weapons.
Iran said it would enrich uranium “more than before...in the next weeks” if negotiations failed over the deal.
Britain, France and Germany had made attempts to persuade the US president to preserve the deal but Mr Trump last night said the agreement was “disastrous” and a “great embarrassment” to him.
He called the deal “decaying and rotten”.
Speaking in the White House, Mr Trump said: “The Iran deal is defective at its core. If we do nothing, we know exactly what will happen.
“In just a short period of time, the world’s leading state sponsor of terror will be on the cusp of acquiring the world’s most dangerous weapon. Therefore, I am announcing today that the United States will withdraw from the Iran nuclear deal.”
Mr Trump said if Iran “continues its nuclear aspirations it will have bigger problems than it has ever had before”.
He added: “I want to deliver a message to the long-suffering people of Iran: The people of America stand with you.”
Mr Trump said it had been nearly 40 years since the regime “seized power and took a proud nation hostage”.
“The future of Iran belongs to its people,” he added.
He said Tehran would want to negotiate a new deal.
“When they do, I am ready, willing and able,” he said. “Great things can happen for Iran.”
Mrs May, Mrs Merkel and Mr Macron said: “It is with regret and concern that we, the leaders of France, Germany and the United Kingdom, take note of President Trump’s decision to withdraw the United States of America from the Joint Comprehensive Plan of Action.
“Together, we emphasise our continuing commitment to the JCPOA [Joint Comprehensive Plan of Action]. This agreement remains important for our shared security.”
They urged Iran to “show restraint” in response to the decision by the US.
Former US president Barack Obama called Donald Trump’s decision to pull out of the deal a “serious mistake” that will erode America’s global credibility.
Mr Obama’s administration brokered the deal. He said Mr Trump’s decision to withdraw is “misguided,” especially because Iran has been complying. The former president warned: “The consistent flouting of agreements that our country is a party to risks eroding America’s credibility, and puts us at odds with the world’s major powers.”
Mr Obama said that without the deal, the US “could eventually be left with a losing choice between a nuclear-armed Iran or another war in the Middle East”.
On Monday, Boris Johnson made a diplomatic dash to Washington in a last ditch push to win over the president. The Foreign Secretary said Mr Trump would be in line for the Nobel Peace Prize if he could fix the agreement.
The JCPOA was signed by the US, China, Russia, Germany, France and Britain with Iran in 2015.