Sorry I can't give a very detailed answer, and i'm not even sure it's 100% correct but here goes.
The gesalt ID is a number that represents the family of macs that your computer belongs to. e.g Powermac Performa 6200 series = 42. Not sure how many families there are, but it must be based on something like motherboard and form factor so there could be hundreds. So basically it's just a code for your type of mac.
Your machines gesalt ID is used when installing software, such as the Operating System, to calculate what sort of machine it's being installed on and therefor which specific componants (if any) need to be installed.