The USD is not literally backed by gold, but part of the Federal Reserve's mission is to moderate the rate of inflation; that means holding the value of the USD steady. And the way they do it is beyond the scope of this discussion, but it certainly depends on the Federal Reserve trading its holdings on the market (which, as you point out, is mainly debt (in terms of USD), not gold).