The original basis for Hinduism are the holy books called the "Vedas". In the ancient times, the followers of Vedas developed many forms of worships and cults. And they also quarrelled among themselves. So the Vedic Culture was split. This was taken advantage of, by the Buddhists and the Jains who belonged non-Vedic religions. The Vedic Culture was facing the danger of becoming extinct.
Then the great Adhi Sankara came. He overcame all the non-Vedic religions and combined all the different cults which were based upon the Vedas. He created six branches of the Vedic religion. Each of them had its own supreme god or goddess. But they were all based on the Vedas. The branch with Siva as the Supreme Lord was called Saivism. For Vishnu, was Vaishnavism. Ambal worship was called Shaktha. Surya had Saura and Muruga had Kaumara as their sub-religions.
The branch which followed Ganapathi as its chief god, was called Ganapathya. The present form of Hinduism that we follow now, is an amalgam of all these six sub-religions, with elements of totemism, paganism, ancestral worship, guardian deity worship and animism. During the course of time, all the other five sects accepted Ganapathi and gave Him prominence their systems. In all of them, Ganapathi is worshipped before any puja, ceremony or rites. When any new venture is undertaken, Ganapathi is first worshipped. He is worshipped to prevent and remove obstacles. It is also believed that failure to worship Ganapathi will lead to problems.
There are many stories about Ganapathi. He awas created from the Body of Ambal by Herself. She made Him Her guard. In a battle His head was cut off. Siva fixed an elephant's head onto the body. So He became named as Gajaanana. He was made as the chief of the servants of Siva, Thus He earned the name as Ganapathi, GanaNatha, Ganesvara, and Ganesa. As the remover of ostacles, He is known by the names, VignaRaja and Vignesvara. Since He is worshipped before any other god is worshipped, He is known as Vinayaka - "He who has no overlord".
When Veda Vyasa, composed the great epic of MahaBharatha, Ganesa was asked to do the writing. So Ganesa broke off His right-sided tusk and with it wrote the Maha Bharatha, while Vyasa recited the verses. Because He has only one tusk, He is known as Eka Danta. He always keeps His trunk curled and thus earned the name "Vakra Thunta". His big belly has earned for Him the name, "Lambhodhara". His large body gives Him the name Maha Kaaya. His size, shape, and elephant-head together, have given Him the name Vikata. He has the Moon as the tilaka on His fore-head. So He is called Palachandra. In Tamil, he is known as the Pillaiyar. This is because He is the eldest son of Siva and Ambal.
Once upon a time, there was an Asura demon who threatened the worlds. Ganesa went after Him. But the asura changed into a huge rat, called the bandicoot. Ganesa sent His noose called Paasa and tied him. Ganesa's Paasa removed all the ignorance from the asura. But he remained in the form of the rat which is known as Mushika. Hence Ganesa is also called Mushika Vahana. There are many exploits of Ganesa. He used His intellect to win a competition with His younger brother Muruga. His prize was the Divine Mango.