Gold prices log first gain in 7 sessions