Gold prices end lower after back-to-back gains