gold gains on dollar weakness