NEW YORK, Aug 27 (Reuters) - Equity indexes on Wall Street gave up earlier gains on Tuesday amid uncertainty over the prospects for a U.S.-China trade deal, while demand for U.S. treasuries and precious metals grew, showing an appetite for less-risky investments.

Bond market investors showed a cautious picture as the margin on interest rates on U.S. three-month Treasury bills over the yields on benchmark 10-year Treasury notes grew to its widest level since early 2007.

Gold rose as investors sought cover from worries over global economic growth and trade, while silver latched on to bullion's rally to breach the $18 an ounce mark for the first time in nearly two years.

The U.S. benchmark S&P 500 index fell as investors lost some of the trade optimism that had helped boost overseas markets.

Stock markets in Asia and Europe had advanced following U.S. President Donald Trump's comment on Monday that Chinese officials had contacted their U.S. trade counterparts and offered to resume negotiations, an assertion China did not confirm.

"We continue to have concerns about the global economy. The U.S. President's deal with China is pending and that may be the rhetoric from the White House as opposed to an actual fact pointing to negotiation," said Bart Melek, head of commodity strategies at TD Securities in Toronto.

The Dow Jones Industrial Average fell 84.06 points, or 0.32%, to 25,814.77, the S&P 500 lost 7.05 points, or 0.24%, to 2,871.33 and the Nasdaq Composite dropped 22.98 points, or 0.29%, to 7,830.75.

In currencies, investors were also sceptical of trade hopes as the U.S. dollar lost ground to Japan's yen. The Japanese yen strengthened 0.35% versus the greenback at 105.78 per dollar,

The dollar index fell 0.07%, with the euro down 0.1% to $1.1089.

"Safer bets are outperforming as the dust settles on trade war developments that left uncertain whether the U.S. and China would strike a deal anytime soon. Persistent trade uncertainty is credited with slowing the global economy and leaving it vulnerable to tipping into recession," said Joseph Manimbo, senior market analyst at Western Union Business Solutions.

Benchmark 10-year notes last rose 20/32 in price to yield 1.4761%, from 1.544% late on Monday.

The yield curve remained inverted with the spread on interest rates on three-month bills over 10-year yields hitting its widest level since March 2007. The yield curve often inverts prior to a U.S. recession.

"The level of stress and volatility is persisting. The market is not convinced it has found its footing," said Bruno Braizinha, U.S. rates strategist at Bank of America Merrill Lynch.

Spot gold added 1.1% to $1,542.10 an ounce. However, gold prices were below their Monday high of $1,554.56, a level which was last seen in April 2013.

Oil prices rose as investors in the commodity appeared to latch on to Trump's Monday prediction of a trade deal with China.

U.S. crude rose 0.35% to $53.83 per barrel and Brent was last at $58.60, down 0.17% on the day.

The Shanghai Composite Index had rallied 1.35%, with a boost from data showing China's industrial companies returned to profit in July. (Reporting by Sinéad Carew, Kate Duguid, Richard Leong in New York, Karthika Suresh Namboothiri and Asha Sistla in Bengaluru, Ritvik Carvalho and Saikat Chatterjee in London; Editing by Bernadette Baum)