Gold hovered near $5,100 an ounce after hitting a record high as investors sought safety amid policy uncertainty and geopolitical risks.