Source please. I find that an incredulous statement. Germany has the world's third largest economy with a $1.8 trillion GDP. It is the world's second largest exporter. How can approximately 100,000 American troops plus their families in a nation of 82 million account for 15-25% of their economy?
DOD says that the Germans receive about $6 *Billion* per year from the US military., through contracting, rent, services, etc., etc. You can check the DOD website (I'm not going to try to use their dysfunctional search engine) for info. That's the direct part.
There was a recent study by some German federal bureau that put the economic dependency on US bases at 17%. Others quote higher or lower. I'm not going to try to navigate the German web system to try to find that again - German is my sixth language and I'm not that great with it. The report is out there.
It also is not necessarily what we provide to the GNP, but how much Germany would be left to do on its own, defensively, that probably contributes to the high percentage. They may have a very strong economy, but we provide the defenses for that economy. They would have to spend a lot more of the GNP (non-government, not that government creates instead of eats GNP), on national defense.