Trump had threatened a drawdown in forces earlier this week after sparring with German Chancellor Friedrich Merz, who said on Monday the Iranians were humiliating the US in talks to end the two-month-old war.
A senior Pentagon official, speaking on condition of anonymity, said recent German rhetoric had been "inappropriate and unhelpful."
"The president is rightly reacting to these counterproductive remarks," the official said.
The Pentagon said the withdrawal was expected to be completed over the next six to 12 months.
Germany is the US military's biggest basing location in Europe, with some 36,000 active duty military personnel, and serves as a key training hub.
The official said the drawdown would bring US troop levels in Europe back to roughly pre-2022 levels, before Russia's invasion of Ukraine triggered a build-up by then president Joe Biden.
A brigade combat team now in Germany will be pulled out of the country and a long-range fires battalion that the Biden administration had planned to begin deploying to Germany later this year will no longer deploy, the official said.
Trump has singled out Germany even as he has harshly criticised other NATO allies for not sending their navies to help open the Strait of Hormuz during the conflict.
The waterway, a chokepoint for global oil shipments, has remained virtually shut, causing market turmoil and unprecedented disruption in energy supplies.
Merz has said Germans and Europeans were not consulted before the US and Israel started attacking Iran on February 28, and that he had conveyed his scepticism about the conflict directly to Trump afterwards.
"The president has been very clear about his frustrations about our allies' rhetoric and failure to provide support for US operations that benefit them," the senior Pentagon official said.
It is unclear if more US withdrawals from Europe will follow.
Last month, Trump threatened to impose a full US trade embargo on Spain, where the Socialist leadership said it would not allow its bases or airspace to be used to attack Iran. The United States has two important military bases in Spain: Naval Station Rota and Morón Air Base.
Trump has also clashed with Italian Prime Minister Giorgia Meloni over the Iran war and Trump's criticism of Pope Leo. The US president said in April that Meloni, once a strong Trump supporter, lacked courage and had let Washington down.
Trump has long wanted to reduce the US troop presence in Germany. He pushed for a reduction of about 12,000 troops at the end of his first term, but that cut was never enacted. Trump lost the election and Biden reversed the plan.
Trump's Wednesday announcement that he was reviewing US troop levels in Germany surprised German military officials who spoke to Reuters, citing what they called constructive meetings at the Pentagon earlier in the day.
They argue Germany has done more than other allies to support the US war in Iran, including allowing the use of bases and giving permission for overflights.
Earlier this week, the German government approved key targets for its 2027 budget, including a strong commitment to increase defence spending.