Gold prices increased on Tuesday as the dollar retreated slightly from close to a six-month high even as strong US economic data sealed the case for the US Federal Reserve to increase interest rates. US services sector activity accelerated in May, pointing to robust economic growth in the second quarter.
Other data showed job openings rising to a record high in April, far outpacing hiring.
The Institute for Supply Management's non-manufacturing activity index jumped 1.8 points to 58.6, ending three straight monthly declines. The reading indicates expansion in the sector, which accounts for more than two-thirds of US economic activity.
Spot gold gained 0.5 percent at $1,298.45 per ounce by 1:32 p.m. EDT (1732 GMT).
US gold futures for August delivery settled up $4.90, or 0.4 percent, at $1,302.20 per ounce.
"The dollar could not find support from the data because it had been in a strong uptrend recently in anticipation of improving data and speculators are taking profit on those long dollar positions ahead of the Fed meeting next week," said Forex.com's Fawad Razaqzada.
Meanwhile, silver rose 1 percent at $16.52 an ounce. Platinum lost 0.5 percent at $896.25 an ounce. It earlier hit a low of $888, the lowest since May 21. Palladium dropped 0.1 percent at $992 per ounce after hitting a six-week high of $1,010.50 the previous session.