Gold turns higher ahead of closing bell to notch a modest gain