The GM voices are General MIDI voices for playing back Standard MIDI Files (that use the GM voice set), so that they will sound correctly without the need for tweaking or revoicing. The original GM voice set provided 128 different tones. For a while, some keyboards came with the GM2 voice set, which expanded the number of available tones to 256, but that voice set seems to have gone by the wayside in the past few years. GS voice sets are Roland's extensions to the generic GM/GM2 voice sets, and at their peak, provided somewhere between 600 and 800 different tones in their Sound Canvas tone modules and compatible keyboards. Most of these additional tones were totally new and different from the GM/GM2 sets and the earlier SC modules, but many were also just enhanced (better sounding) versions of earlier tones. They were introduced on their SC55 Sound Canvas tone module, as a departure from their MT-32 tone module, which provided a modicum of affordable "generic" tones. From there, they expanded to the SC88, then to the SC88 Pro, which shared its voice set with their top of the line arranger - the G1000. XG voice sets are basically Yamaha's equivalent to the Roland GS voice sets, but whereas the Roland GS voice sets have been all but abandoned by all but a few die-hards like myself, the XG voice sets are still very much alive and well, as seen to by Yamaha by inclusion of them in many of their current keyboards, especially with its abbreviated economical XG-LITE voice set in its entry level keyboards. An exception to the above statement about the demise of the Roland GS voice set is the Microsoft Wavetable Synth voice set, that we have all come to know and love so well, on all of our Windows PC's and laptops. Microsoft licensed a subset of the SC88 voice set to make the MS Wavetable Synth.
So, a keyboard with its own voice set, as well as GM, GS, and XG voice sets will obviously be able to playback its own native MIDI song files, but should also be able to playback generic GM MIDI files, as well as Roland GS and Yamaha XG MIDI files, all without the need for revoicing to sound correctly.
Roy