The most active gold contract for December delivery rose 3.40 dollars, or 0.23 percent to close at 1,460.30 dollars per ounce.
"Following recent selling pressure, the bullish traders decided to do some bargain hunting today and buy the dip in prices," wrote Jim Wyckoff, a senior analyst with kitco.com.
The U.S. dollar index, a measure of the greenback against a basket of other major currencies, softened to around 98.25 on Tuesday, or 0.07 percent lower than the previous day.
When the dollar retreats, the dollar-priced gold becomes less expensive and more attractive to investors holding other currencies.
However, the Dow Jones Industrial Average and other U.S. stock benchmarks firmed on Tuesday, curbing the rise of gold.
As for other precious metals, silver for December delivery was up 15.9 cents, or 0.94 percent, to close at 17.045 dollars per ounce. Platinum for January delivery rose 11.30 dollars, or 1.25 percent, to settle at 911.70 dollars per ounce.