gold prices gain on dollar retreat