Ayatollah Ali Khamenei had earlier accused Mr Trump of telling “more than 10 lies” when he announced the US was withdrawing from the Iran nuclear deal on Tuesday.
He added that the president had threatened the people of Iran and its government.
Khamenei told a cheering crowd in Tehran on Wednesday: “Trump has written a letter to the leaders of the Persian Gulf countries.
“We could obtain this letter and see it.
“In this letter he tells them that you must all become united, you must do this and you must do that because I spent seven trillion dollars here for you.
“You petty man (Mr Trump) – you spent that money to dominate Iraq and Syria but you failed.
“To hell with that.”
In a fiery speech in the Iranian capital, he later added: “The body of this man, Trump, will turn to ashes and become the food of the worms and ants while the Islamic Republic continues to stand.”
Khamenei told the crowd that Iranian officials “want to continue the nuclear deal” with Britain, France and Germany, but added: “I do not trust these countries either.”
He continued: “If you could get guarantees from them in such a way that they can be trusted, no problem then you can continue.
“If you cannot get such a strong guarantee from them, and I see it very unlikely that you can, we could not move and continue like this anymore.”
On an official statement on his website on Wednesday, Khamenei wrote: “You heard last night that the president of America made some silly and superficial comments.”
“He had maybe more than 10 lies in his comments. He threatened the regime and the people, saying I’ll do this and that.
“Mr Trump I tell you on behalf of the Iranian people: you’ve made a mistake.
“You cannot do a damn thing.”
Iran’s Islamic Republic and theocratic government ensures that Khamenei has the final say on all state matters.
During his White House address, Mr Trump called the Joint Comprehensive Plan of Action (JCPOA) “disastrous” and “one-sided”.
He said no action taken by Iran had been more dangerous than its pursuit of nuclear weapons, and claimed the deal had allowed Iran to enrich uranium and “cause havoc within the Middle East and beyond”.
The 2015 agreement was made by Iran and the US, the UK, Russia, France, China, Germany and the EU to ensure Iran’s nuclear programme was “exclusively peaceful”.
In return, the US agreed to lift a range of nuclear-related sanctions, which Mr Trump will now reimpose.
Under the deal, spearheaded by Barack Obama, Iran stopped producing 20% enriched uranium and gave up the majority of its stockpile in return for most international sanctions on it being lifted.
President Hassan Rouhani warned that Iran was ready to resume its nuclear activities if its interests were not guaranteed under a deal without the United States.
“If needed, we will resume our nuclear enrichment at the industrial level without any limit,” he said.
Britain and its key European allies – who expressed their “regret and concern” over Mr Trump’s decision in a joint statement on Wednesday – have been left scrambling to keep the deal alive.
Foreign Office Minister Alistair Burt told the BBC Radio 4 Today programme there was a need to de-escalate tensions in the wake of Mr Trump’s warning that he was ready to impose the “highest level” of sanctions on Tehran.
According to the US Treasury, sanctions related to Iran’s energy, auto and financial sectors will be reimposed in three to six months.
The speaker of the Iranian parliament – where US flags were burned in the wake of the announcement – said there was now a window in which the EU could demonstrate whether it had the international clout to keep the agreement going.
Germany’s foreign minister Heiko Mass has vowed to work to preserve the deal and prevent an “uncontrolled escalation” of tensions in the Middle East
The Iran deal was seen as one of the Obama administration’s key foreign policy achievements.
“I believe that the decision to put the JCPOA at risk without any Iranian violation of the deal is a serious mistake,” the former president said in a statement.
“Without the JCPOA, the United States could eventually be left with a losing choice between a nuclear-armed Iran or another war in the Middle East.”
More from Donald Trump
Iran nuclear deal: The President has made a dangerous move
US pulls out of Iran deal: What happens next?
Melania Trump embroiled in another plagiarism row
Ditching Iran nuclear deal ‘serious mistake’ – Obama
Trump pulling out of Iran nuclear deal would be a dangerous moment
Johnson: Trump could be in line for Nobel Peace Prize if he fixes North Korea and Iran
Russia’s deputy UN ambassador Dmitry Polyanskiy said Moscow was “disappointed” but “not surprised” by the move, which has also been criticised by the Chinese foreign ministry.
But Israeli Prime Minister Benjamin Netanyahu praised a “brave and correct” decision.