At that time, the International Monetary System, known as the Bretton Woods System, was dominated by the US currency. As long as this system was in force, which was up until 1971, the US Fed was obliged to exchange its currency for gold. Any current account surplus thus resulted in an increase in Germany’s gold reserves.
This gold was stored in US vaults for obvious reasons. This was not only the case for the gold hold by the Bundesbank – it was, in fact, common practice. By the way: it was the only practical thing to do, since running a trade account deficit meant a decrease in gold stocks.