Gold prices fell on Tuesday as investors locked in profits after the precious metal closed at an all-time high in the previous session and ahead of key U.S. inflation data that could shape expectations around the Federal Reserve's monetary policy path.

Spot gold was down 0.4% at $2,461.60 per ounce by 1019 GMT. Prices rose 1.7% to $2,472, a record high for the closing price, on Monday.

Non-yielding gold is up 19% so far this year after spot prices touched a record high of $2,483.60 on July 17 on improved market confidence that the Fed would cut interest rates in September.

"There is for sure some taking money off the table as we got close to $2,480. If the selling does not go below $2,430, then we have a solid base to try $2,500 as volatility in the geopolitical spectrum is still quite high," a trader said.

Fears that the conflict in Gaza could turn into a broader Middle East war have escalated after the killing of Hamas leader Ismail Haniyeh in Iran last month.

Traders are awaiting July U.S. producer price figures due later in the day and consumer price (CPI) numbers on Wednesday. Markets see about 50% chance of a 50-basis point rate cut in September, according to the CME FedWatch Tool.

"The Fed's cutting cycle, when it begins, will attract strategic investment in gold," analysts at ANZ said, raising their year-end price target for bullion to $2,550.

With the expected nearing of rate cuts, global physically backed gold exchange-traded funds (ETFs), a crucial category of demand, started purchases again after several years of outflows and so far have seen three consecutive months of inflows.

Gold ETFs, storing bullion for investors, saw net inflows of 48.5 metric tons ($3.7 billion) in July, the largest monthly inflow since March 2022, according to the World Gold Council.

Meanwhile, retail jewellery demand in China, the world's top consumer, has been muted by high prices. There has also been a pause in gold buying by China's central bank.

Among other metals, spot silver fell 1.0% to $27.74 per ounce, platinum was stable at $936.10 and palladium rose 0.1% to $921.03.

(Reporting by Polina Devitt in London; Additional reporting by Daksh Grover and Ashitha Shivaprasad in Bengaluru; Editing by Jacob-Phillips and Shounak Dasgupta)