There are several Puranic stories about Lord Ganesha and his elephant head. These stories are:
(1) Once Parvati, just for fun, prepared an image of a child with an elephant's head, out of the unguents smeared over her body and threw it into the river Ganga. It came to life. Both Ganga and Parvati addressed the boy as their child. Hence Lord Ganesha is known as Dvaimatura, 'one who has two mothers';
(2) Parvati prepared the image of a child out of the scurf from her body, endowed him with life and ordered him to stand guard before her house. When Siva wanted to enter the house he was rudely prevented by Ganesha. Siva became Rudra and got him beheaded. Seeing that Parvati was inconsolable, Siva grafted an elephant's head on the body of the boy and gave him life. Siva appointed this new-found son as the head of all his retinues, who thus became 'Ganapati'.
(3)He sprang from Siva's countenance which represents akashtattva (principle of ether). His captivating splendour made Parvati react angrily and curse him, resulting in the elephant head; and
(4) Ganesha was originally Krishna himself in the human form. When Sani, the malevolent planet spirit gazed at him, his head got separated and flew to Goloka. The head of an elephant was subsequently grafted on the body of the child.
All these Puranic stories are taken from the book 'Hindu Gods and Goddesses' by Swami Harshananda. Swami Harshananda of the Ramakrishna Order is an Advaitist and does not take the Puranic stories seriously. The learned Swami gives several views regarding the meaning of the elephant head. First he points out that Ganapati had gained de facto recognition in the hearts of millions of votaries over several centuries long before the Puranas were written. Several Puranic stories reflect the struggle by various Puranic authors to give de jure recognition to Ganapati! He gives the following possible meanings of the elephant head:
(1) 'Gana' means category. Everything that we perceive through our senses or grasp through our mind can be expressed in terms of category. The principle from which all such categories have manifested themselves is Ganapati, the Lord of categories. In effect, it means the origin of the whole creation, God Himself;
(2) A common Sanskrit word to denote elephant is 'Gaja'. Hence the name Gajanana or Gajamukha (elephant-faced) for Ganapati. But the word 'Gaja' has a deeper connotation. 'Ga' indicates 'Gati', the final goal towards which the entire creation is moving. 'Ja' stands for 'Janma' or birth or origin. Hence 'Gaja' signifies God from whom the worlds have come out and towards whom they are progressing, to be ultimately dissolved in Him. The elephant head is thus purely symbolical and points to this truth;
(3) A factor we observe in creation is its two-fold manifestation as the microcosm (Suksmanda) and macrocosm (Brahmanda). Each is a replica of the other. They are one in two and two in one. The elephant head stands for the macrocosm and the human body for the microcosm. The two form one unit. Since the macrocosm is the goal of microcosm, the elephant part has been given greater prominence by making it the head.
(4) The elephant-human form of Ganapati is the iconographical representation of the great Vedantic dictum, 'tat-tvam-asi'(which means You the apparently limited individual are in essence the Cosmic Truth, the Absolute). The elephant stands for the cosmic whereas the human stands for the individual.