Writing in the New York Times, foreign minister Javad Zarif also called on European powers to help preserve a 2015 deal under which Iran curbed its nuclear programme in exchange for the lifting of a number of international sanctions.
Mr Trump struck refused to certify the deal in October and alleged Iran was flouting its terms despite findings to the contrary by UN nuclear inspectors.
The US president has also called Iran an “economically depleted rogue state” that exports violence.
Mr Zarif wrote: “Europe should not pander to Washington’s determination to shift focus to yet another unnecessary crisis – whether it be Iran’s defensive missile programme or our influence in the Middle East.”
His remarks seemed to be at least partly aimed at France which has been critical of the Islamic Republic’s missile tests and regional policy, including involvement in Syria’s war.
Last month French President Emmanuel Macron said he was “very concerned” by the missile programme and called for talks about it, an appeal rejected by Iranian officials.
Mr Zarif insisted Iran’s missiles are for defensive purposes only.
He wrote: “We have honed missiles as an effective means of deterrence. And our conscious decision to focus on precision rather than range has afforded us the capability to strike back with pinpoint accuracy.
”Nuclear weapons do not need to be precise. Conventional warheads, however, do.”
While criticising the missile programme, European powers that were party to the nuclear deal – Britain, France and Germany – have reaffirmed their commitment to the nuclear deal and voiced concern that Mr Trump called it into question.
Mr Zarif also criticised rival Saudi Arabia’s regional policy and military campaign in Yemen but also called for dialogue.
He wrote: “As Iran and its partners our to put out fires, the arsonists in our region grow more unhinged.
“They’re oblivious to the necessity of inclusive engagement.”