Other precious metals also rallied, with silver hitting its highest in more than two years and platinum jumping 3pc.
Spot gold rose 0.2pc to $1,541.64 per ounce at 10:33 a.m. EDT (1433 GMT), within sight of its highest level since April 2013, the $1,554.56 hit on Monday.
US gold futures rose 0.1pc to $1,550.70 per ounce.
"A lot of traders out there feel that even though China came back and said that they want to talk calmly, nothing has really changed ... (Even) with the markets rallying, gold has been pretty much flat," said Michael Matousek, head trader at US Global Investors.
Wall Street gained after China's commerce ministry made comments indicating that Beijing was hopeful of a resolution to the long-standing trade dispute with the United States.
Gold held onto its gains even as recession fears eased after US Treasury yields briefly extended their rise on data showing the world's largest economy grew as expected in the second quarter.
The US Federal Reserve and the European Central bank are widely expected to cut rates next month. Many investors believe the Bank of Japan could follow suit.
With the current economic weakness, "global central banks will be accommodative and that is supportive for gold," said Jeff Klearman, portfolio manager at GraniteShares.
Holdings of the SPDR Gold Trust, the world's largest gold-backed exchange-traded fund, have increased by 6.6pc this month.
Spot silver rose 1.4pc to $18.58 per ounce, after matching a high last seen in April 2017 of $18.65.
"Silver had lagged in performance for a long time and now it's joining the ranks of safe-haven investments. It's benefiting from that, and you see platinum doing the same thing," said Klearman.
Platinum rose 3.8pc to $934 per ounce after its highest since April 2018 at $935.12, while palladium rose 1.3pc to $1,487.54 per ounce.