Gold prices bounced back in volatile trading on Friday, as focus turned to economic risks after elevated U.S. inflation readings bolstered bets for aggressive interest rate hikes.

Spot gold rose 1.4% to $1,873.58 per ounce by 2:40 p.m. EDT (1840 GMT). U.S. gold futures settled up 1.2% at $1,875.50.

U.S. consumer prices accelerated in May, suggesting the Federal Reserve could continue with its 50 basis points rate hikes through September, sending gold to its lowest since May 19 at $1,824.63.

But the safe-haven asset soon erased losses as investors assessed the economic repercussions, with bullion getting a further fillip after the University of Michigan's survey showed U.S. consumer sentiment plunged to a record low in early June amid soaring gasoline prices.

"Gold has had a manic roller coaster ride, dropping to lows of the month before rallying sharply on the CPI report and bouncing back again on the worst consumer sentiment report on record," said Tai Wong, an independent metals trader in New York.

High interest rates usually dim bullion's appeal since they translate to an increased opportunity cost of holding the asset, which pays no interest. Gold's fate next week may hinge on the Fed meeting, Wong added.

Gold's rebound also came despite strength in the dollar, and elevated U.S. Treasury yields.

Gold prices have been "remarkably resilient given (rate) hiking expectations, and a softening physical market" on concerns that inflation may outpace rate hikes, said Standard Chartered analyst Suki Cooper.

Physical gold discounts in India this week hit seven-week highs, while COVID-19 curbs dissuaded buyers in China.

"However, gold will likely give up all these gains and trend lower toward below $1,800/oz, as policy rates rise sharply," analysts at TD Securities said in a note.

Silver , like gold, erased initial declines to gain 1.2% at $21.92 an ounce.

Platinum rose 0.3% to $973.91, but palladium eased 0.1% to $1,922.82

(Reporting by Kavya Guduru and Arpan Varghese in Bengaluru; Editing by Emelia Sithole-Matarise and Shinjini Ganguli)