The vote came after the United States imposed fresh sanctions against Iran in July, targeting its missile programme. Parliament speaker Ali Larijani said "the Americans should know that this was our first action".
Iran's parliament on Sunday approved more than half a billion dollars in funding for the country's missile programme and foreign operations of the elite Revolutionary Guards in response to US sanctions.
The move follows a spike in tensions between Tehran and Washington since US President Donald Trump took office in January with a vow to get tough on Iran.
"The Americans should know that this was our first action," said parliament speaker Ali Larijani, after announcing overwhelming support for a package "to confront terrorist and adventurist actions by the United States in the region".
A total of 240 parliamentarians out of 244 present voted for the bill.
It mandates the government to allocate an additional $260 million for missile development and the same amount to the Revolutionary Guards' foreign operations wing, the Quds Force, state news agency IRNA said.
The Quds Force leads Iran's military role in Syria and Iraq.
The vote came after the United States imposed fresh US sanctions against Iran in July, targeting its missile programme.
Tehran says the measures violate a 2015 deal with world powers that eased sanctions in exchange for curbs on its nuclear programme.
Trump repeatedly threatened to tear up what he once called "the worst deal ever", but last month he backed away from a key campaign promise to withdraw from the nuclear agreement.
'Hostile US actions'
Iran's Deputy Foreign Minister Abbas Araghchi said the bill passed on Sunday had the support of the government.
The bill is "very smart particularly because it doesn't violate the nuclear deal and doesn't allow the other side to make excuses," he added.
"Iran boasts potential and actual options to confront hostile US actions".
The United States has had no diplomatic ties with the Iran since 1980, and Trump has halted the direct contacts initiated by his predecessor Barack Obama.
A string of close encounters between US ships and Iranian vessels in the Gulf in recent months has added to the tensions between the two countries.
Araghchi said that the Iranian bill was a far-reaching response to the measures passed by US Congress that Iranian media have called the "mother of sanctions" because they sum up all existing anti-Iran sanctions.
The bill's text said that Iran "recognises the entire American military and intelligence forces as terrorist groups" for their "implicit and explicit support for terrorist groups" in the region, their role in creating Daesh, and "the support for violators of fundamental humans rights especially the dictator and violent regimes".
Under the law, the foreign ministry is tasked to create and publish a blacklist of people to be put under sanctions – in cooperation with the Revolutionary Guards' foreign operations wing, Central Bank, and ministry of intelligence.
Tehran's sanctions aim to ban such persons from entering Iran, confiscate their assets within its powers, and block their financial transactions.
It excludes whistleblowers who reveal America's "illegal activities, crimes, torture and election fraud", namely in Iraq, Afghanistan or elsewhere.
The bill also mandates the economy ministry to prioritise deals with countries and companies that ignore financial and military sanctions on Iran.
It orders the foreign ministry and the judiciary to take measures to protect Iranians in US prisons for violation of sanctions or facing persecution and extradition elsewhere.