"You are seeing images of the successful test of the Khorramshahr ballistic missile with a range of 2000 km, the latest missile of our country," state television said, adding this was Iran's third missile with such a range.
The Khorramshahr was first displayed at a military parade on Friday, where President Hassan Rouhani said Iran would strengthen its missile capabilities.
"Extremely concerned by reports of Iran missile test, which is inconsistent with UN resolution 2231. Call on Iran to halt provocative acts," British Foreign Secretary Boris Johnson wrote on Twitter.
France also said it was extremely concerned and called on UN Secretary-General Antonio Guterres to carry out a full report on the launch.
Trump told the UN General Assembly on Tuesday that Iran was building its missile capability and accused it of exporting violence to Yemen, Syria and other parts of the Middle East.
He also criticised a 2015 pact that the US and other world powers struck with Iran under which Tehran agreed to restrict its nuclear program in return for relief from economic sanctions.
Iran's defence minister said on Saturday foreign pressures would not affect Iran's missile program.
"On the path to improve our country's defensive capacity we will certainly not be the least affected by any threats and we won't ask anyone's permission," Brigadier General Amir Hatami said in remarks carried by state television.
Iran denies its missile development breaches the UN resolution and says its missiles are not designed to carry nuclear weapons.