Mahan Air is on a U.S. sanctions list and Washington has long urged allies to ban the airline from their territories.
The decision to ban it came after consultations with European allies and the U.S., Chancellor Angela Merkel's spokesman Steffen Seibert told reporters.
"It cannot be ruled out that this airline carries out transports to Germany that affect our security concerns," he said.
"This is especially true against the backdrop of terrorist activities, intelligence on terrorist activities from the Iranian side and Iranian entities in Europe in the past."
U.S. Secretary of State Mike Pompeo welcomed the German decision.
"The airline transports weapons and fighters across the Middle East, supporting the Iranian regime's destructive ambitions around the region," he said in a tweet. "We encourage all our allies to follow suit."
The airline had several weekly flights between Tehran and German cities. The company's general sales office in Germany said it had no comment on the ban.
Foreign Ministry spokesman Christofer Burger said the decision was taken to safeguard Germany's "foreign and security policy interests," citing increasing evidence of Iranian intelligence activity in Europe.
In addition, he said the airline has ties to Iran's Revolutionary Guard and provides military transport flights to Syria. Iran has supported Syria's President Bashar Assad.
The move comes at a time of particularly sensitive relations with Iran. Germany plays a large role in trying to salvage the 2015 nuclear deal with Tehran after U.S. President Donald Trump's decision to unilaterally pull out last year.
It was the latest of several issues, however, that have caused friction.
Among other things, German prosecutors said last week they had detained a 50-year-old German-Afghan dual citizen who had worked as a translator for the army on suspicion he had been spying for Iran.
Iran's Foreign Ministry dismissed the allegations on the weekend, saying that "enemies" were aiming to "sour relations" between Iran and Europe.
And last year, Germany's central bank changed its conditions allowing it to block transfers unless it receives assurances a transaction doesn't violate financial sanctions or money-laundering rules - prompting Iran to rescind a request to repatriate 300 million euros ($341 million) from a Hamburg-based bank.
Frank Jordans contributed to this story.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.