Gold ticked higher on Tuesday ‌after hitting a two-week low, while focus was on the U.S. Consumer Price Index data and ​Federal Reserve Chair Kevin Warsh's testimony for monetary policy clues.

Spot gold rose 0.5% to $4,019.50 per ounce ​by 0821 GMT, ​after falling to its lowest level since July 1 earlier in the session.

U.S. gold futures for August delivery. gained 0.5% to $4,026.20.

"Gold prices are ⁠edging higher today, supported by a pause in the U.S. dollar's recent rally," said ActivTrades analyst, Ricardo Evangelista.

The U.S. dollar index was down 0.2%, making dollar-priced bullion less expensive for holders of other currencies.

Investors await the June U.S. CPI data, along ​with Fed Chairman ‌Kevin Warsh's first ⁠semi-annual congressional testimony, both ⁠due later in the day.

"A CPI reading above the region of 3.8% could reinforce expectations ​of a hawkish Federal Reserve and create a ‌headwind for gold prices," Evangelista said.

Elevated oil prices have ⁠heightened inflation concerns, strengthening the case for the Fed to keep rates higher and reducing non-yielding gold's appeal.

Spot gold fell nearly 3% in the previous session, its biggest daily percentage drop in more than a month, as renewed hostilities between the U.S. and Iran drove energy prices higher.

Oil prices rose to their highest in four weeks, as the U.S.reimposed its naval blockade of Iran and the attacks in the Strait of Hormuz fuelled uncertainty about energy flows.

Meanwhile, ‌the U.S. central bank may need to raise interest rates "in the ⁠near term" if coming data show inflation continuing well ​above the 2% target, Fed Governor Christopher Waller said on Monday.

Traders are now pricing in about a 75% chance of a rate hike in September, CME FedWatch Tool's ​data showed.

Among ‌other metals, spot silver rose 0.6% to $58.00 per ounce, and ⁠palladium climbed 1.5% to $1,265.79.

Platinum dropped ​0.2% to $1,601.51.