Gold finishes higher after posting declines in the last 3 sessions