Gold books its first gain in 6 sessions as dollar falls