Gold prices retreated from a new record high on Thursday as investors booked profits after the latest leg of a rally.