Gold ends with a minor gain, up four sessions in five