Perversely, prices for metals had been falling, as the lack of a deal was predicted to trigger a recession and a recession reduces the likelihood of inflation. As gold is often purchased as a hedge against inflation, the lack of a budget deal took away the incentive to buy gold.
With the deal in place and inflation more likely, gold became attractive again.
On the New York Mercantile Exchange, gold for February delivery added $13 or 0.78 percent to $1,688.80 per troy ounce.
Silver for March delivery gained 78 cents or 2.58 percent to $31.01 an ounce.
The dollar dropped early, then climbed. The dollar index closed up 0.09 percent.
The euro fell to $1.3187 from Monday's $1.32. The dollar rose to 87.33 yen from 86.71 yen.
Scarlett Johansson steps out with fiance after pregnancy reveal
Dennis Rodman pledges to end trips to North Korea