Trump said Tehran had taken "too long to negotiate a deal" and would now "have to pay the price", without giving specific details. He said Iran had been "completely defeated" and was "all talk and no action".
It came after Iran's Foreign Minister Abbas Araghchi earlier warned his country would "leave no attack or threat unanswered", saying that the US had suffered "defeats on the battlefield".
The US said it struck Iranian sites on Tuesday in response to the downing of a US army helicopter in the Gulf. Iran then launched strikes at US bases in the region.
Iranian defence systems, ground control stations and radar sites were targeted near the Strait of Hormuz, the US military Central Command (Centcom) said.
Iran's Islamic Revolutionary Guard Corps (IRGC) said it launched strikes on 21 targets at US bases in the region, one in Bahrain and the other in Jordan, while Kuwait's army said it was also intercepting an attack.
Writing on his social media platform Truth Social on Wednesday, Trump said: "Iran's Military is a complete and total mess. Much of it, like their Navy and Air Force, doesn't even exist anymore - They have been completely defeated."
He added: "They've taken too long to negotiate a deal that would have been great for them, now they will have to pay the price!!!"