Gold prices end higher for the first time in four sessions