Gold ends lower, then gains in electronic trade after FOMC minutes