a few things about Ganesh...
here's some flavor:
his head actually came from an elephant-demon named Gajasura (whose friend was a rat-demon named Mushika) who got, as demons usually do, a boon from Shiva that he couldn't handle and he wound up dying because of it.
at the same time, Parvati (Mrs. Shiva), the Mother Divine, was upset with Shiva (he's meditating all the time and has no time to spend with her!) because he didn't want children. in her bath, she thought, "well, I can make my own baby, I don't need him....." and she started making, with her own sweat and sandlepaste (from the bath) and some kum-kum (red powder), a little boy, a baby.
that baby was Ganesha.
unfortunately, the lila goes that She set him outside the door to guard her bath while She was meditating.... and Shiva came home from his hard yogi work and didn't recognize the boy in front of the door.... of his own wife....
anyway, Ganesha didn't know Shiva, either, and so wouldn't let him in to see Parvati. at this point, Shiva got enraged and started fighting a duel with Ganesha... and the long and the short of it is that he lopped off the boy's head.
Parvati came screaming, hysterical... and Shiva couldn't fix the boy again. neither could Mother.
so they sent some Brahmarshis (top Rishis) out to find the head of the first creature they could find, sleeping with the top of its head to the North (the direction of death, when you're sleeping -- not too smart to sleep that way!) and they found the dying Gajasura, an elephant demon... and stuck his head back on the body of the boy Parvati had created.....
and so was created Ganesha.
he's the ultimate siddha, the great great great siddhic master -- Mother's gatekeeper, meaning, gatekeeper to the supernatural abilities....... (which ARE Her.)