gold ends with modest gain, but well below intraday high