In a live televised address, Mr Rouhani branded the sanctions against the ayatollah and other senior officials, including Iran's foreign minister Mohammad Javad Zarif, "outrageous and idiotic".
An exasperated Mr Rouhani said: "You sanction the foreign minister simultaneously with a request for talks?"
Iran had earlier warned the new US sanctions on Monday meant the permanent closure of diplomatic channels between Tehran and Washington.
Foreign ministry spokesman Abbas Mousavi warned the American government was “destroying the established international mechanisms for maintaining world peace and security”.
Mr Trump said the “hard-hitting” sanctions, which came following weeks of escalating tensions between the two countries, were “a strong and proportionate response to Iran’s increasingly provocative action”.
The president's national security adviser, John Bolton, a notable hawk who has repeatedly called for military action against Iran, has insisted Washington was still willing to talk to Tehran.
“The president has held the door open to real negotiations to completely and verifiably eliminate Iran’s nuclear weapons programme, its ballistic missile delivery systems, its support for international terrorism and other malign behaviour worldwide,” he said.
“All that Iran needs to do is to walk through that open door.”
Tensions have been mounting in the Gulf since Mr Trump withdrew the US from a 2015 multilateral deal in which Iran agreed to limit its nuclear programme in return for the lifting of crippling economic sanctions.
Those tensions culminated in the shooting down of a US drone last week. Mr Trump said he ordered reprisal air strikes but called them off at the last minute when he was told of the likely loss of life involved.
Mr Trump said the new sanctions were not only in response to the downing of the American drone.
The US has also blamed Iran for attacks on two oil tankers this month near the Strait of Hormuz, though US officials have so far provided only shaky evidence for the claim, which Iran denies.
Washington claimed the measures effectively freeze billions of dollars worth of Iran assets, but experts said the true impact was likely to be limited.
Richard Johnson, the US state department’s former deputy leader co-ordinator of the Iran nuclear deal, told BBC Radio 4’s Today programme: “Frankly I doubt that there’s many international companies doing business with these organisations, so I don’t think the sanctions will have a really substantive effect on Iran’s economy.
“I do think it’s much more symbolic than it is substantive.”
Additional supporting by agencies