Gold held a gain on optimism that the US and Iran are seeking a negotiated settlement to the war, easing inflation concerns arising from an energy-supply shock.