Shiva Bhagwan left his abode on Mt. Kailas in the Himalayas to meditate in a cave. Parvati’s friends suggested that she should have an attendant (gana) of her own because they were not pleased with Shiva’s ganas.
Thus, she used her divine powers and bore a son. She named him Vinayak and instructed him to guard their home.
When Shiva returned home, Vinayak did not allow him to enter. After a brief argument, Shiva beheaded Vinayak with his trishul. When Parvati heard about this incident, she cried in despair over the loss of her son. As a means to console Parvati, Shiva sent his men to the forest and instructed them to retrieve the head of the first living creature they met.
Shortly, his men returned with the head of a baby elephant. With his divine powers, Shiva placed the baby elephant’s head over his son’s body. In a matter of seconds, Vinayak came back to life.
After this incident, Vinayak became known as Gajaanan, which stems from the root word ‘gaj’ meaning elephant.
Shiva blessed him with a boon and explained that people would first offer their love and devotion to Ganeshji before starting any auspicious activity.
The story comes from brahma-vaivarta purāṇa (third part - Ganesha Khand)
@AksharRoop and @Tejesh Alimilli has already explained two mythological stories which tells us how Lord Ganesha became the 'Pratham pujya' (the one who is worshiped first).
I want to give one more reason for why Lord Ganesha is worshiped before starting any task.
According to the yogic perspective, the presiding deity for the Muladhara Chakra is Shri Ganesha, the Eternal Child (of Adi Shakti)). He is the embodiment of innocence and He guards His Mother Kundalini (Adi Shakti) and Her instrument with great alertness and uncompromising zeal.
"Before human beings were created, before the Earth and sky, long before the sun, the moon, and the galaxies, I (Shri Ganesha) filled everything with holiness and innocence. Single-handedly the Mother Holy Spirit, Adi Shakti, created Me (Shri Ganesha) first to guard and protect Her everywhere. My total surrender to Her (Adi Shakti) and My exclusive alliance to Her can remove any obstacle. In your body I am innocence, wisdom and spontaneity. I am the sanctity of the marriage union and the blessing of saintly children. When Kundalini awakens My presence in you, you regain your lost innocence. She overcomes all of His enemies outside, as well as those within your being. I am the Everlasting Child and the sparkles of My innocence radiate the universe in a constant flow of bliss."
Shri Ganesha was created by the Adi Shakti, the Primordial Power of God Almighty, without the cause of male-female principle. Being born out of the
Primordial Mother, He is with Her all the times and in Muladhara Chakra in the human being. He is the embodiment of innocence, purity, and chastity in creation.
This might be one of reason for people worshipping lord Ganesha before they start off with marriage proceedings, and on marriage invitation cards. As well as keep idols of lord Ganesha in their cars, home entrances, etc.
Ganapati Atharvashirsha says: Shri Ganesha always reside in the "MULADHARA" Chakra of our body and having the Power of trinity (Creative Maintaining & Destructive Powers). He is trigunatmak by having 3 'GUNAS', (Satva: Pure, Rajas: Activating & Tamas: Dull).
Tvam Guna Traya Atitaha
Tvam Deha Treya Atitaha
Tvam Kala Treya Atitaha
Tvam Avastreya Atitaha
Tvam Muladhar Stiti Yosi Nityam
Tvam Shakti Treya Atmakaha
Tvam Yogino Dhayayanti Nityam
Tvam Bramhastvan, Vishnustvam, Rudrastvam, Indrastvam Agnistvam, Vayustvam, Suryastvam, Chndramastvam, Bramha Bhur Bhuva Svorom || 6 ||
You(Shri Ganesha) are beyond the 3 'GUNAS', (Satva: Pure, Rajas: Activating & Tamas: Dull)
You are beyond the 3 Bodies; (Gross, Subtle & Casual)
You are beyond Past, Present & Future (3 State of Time)
You are beyond 3 states of being; (Awake, dream & Deep Sleep)
You always Reside in the "MULADHARA" Chakra
You are the trinity of Power; (Creative Maintaining & Destructive Powers)
Sages always Meditate on you
You are the creator. Sustainer, Destroyer, The Lord of 3 worlds, Fire, Air, Sun, Moon, You are all inclusive & all Pervading || 6 ||
Ramdas swami Manache shlok 1: Ramdas swami also states that Shri Ganesha is stays in Muladhar chakra of ones body, where kundalini shakti sleeps here, waiting to be aroused with blessings of lord Ganesha and it reaches up to Brahman (the absolute).
Ganadhish jo ish sarwa gunancha
Mularambh arambh to nirgunacha
Namu sharada mul chatwar wacha
Gamu panth aanat ya raghawacha || 1 ||
Meaning :Lets prey the god Ganapati, who is the leader of all gana (ganadhish), who is the lord of serveral devine virtues (uttam gun), who is starting element of non-physical existance (nirgun). We pray to lord Ganapati to seek success in our task (of setting us on to a life of betterment). We then pray Maa Saraswati, who is the pioneer energy to the universe for its operation which is in the form of four sound levels (chatwar wacha : para, pashyanti, madhyma and waikhari). With the prayer to Ganadhish and Sharada (after understanding their forms : knowledge and energy respectively). We seek their grace (aashirwad) to enable us go by the ideal life (as demonstrated by lord Ram in his avataar). We wish to walk our life by the path (panth) as shown by Lord Ram (raghav) and endlessly (aanant).
Anything we do has to fall under one of the two categories: material or spiritual. As we know Lord Ganesha rules the 'Muladhara chakra' of our body. 'Muladhara chakra' is the interface between the material and the spiritual worlds. Lord Ganesha is said to control both these worlds. He is the one who gives the material enjoyments in this world and He is the one who liberates us from the endless cycle of birth and death. Our material life as well as our spiritual journey starts from the 'Muladhara chakra' which is controlled by Lord Ganesha. It is He who informs Kundalini when it is time to awaken and to reach nirgun nirakar swarup(brahman). Hence, to complete our life cycle without any obstacles, we need the blessings of Lord Ganesha. Since He is the one who gets rid off all the obstacles from our lives, that is why we worship Lord Ganesha before beginning any important work/task.
Then adoring her son, the goddess Girija, kissed his face, bestowing him with several
boons. Then she said, “You had to suffer much,
धन्योऽसि कृतकृत्योऽसि पूर्वपूज्यो भवाधुना।
सर्वेषाममराणां वै सर्वदा दुःखवर्जितः॥८॥
You are quite graceful. You are successful in all your missions. You would be adored
first of all the gods and those who would do so would always remain comfortable.
Lord Vishnu and Lord Brahma also declared the same.
अहं च शङ्करश्चैव विष्णुश्चैते त्रयः सुराः।
प्रत्यूचुर्गुगपतप्रीत्या ददतौ वरमुक्तमम्॥२०॥
Then I myself, besides Siva and Visnu, bestowed on him the best of boons, and Said to him collectively.
त्रयो वयं सुरवरा यथा पूज्या जगत्रये।
तथाऽयं गणनाथश्च सकलैः प्रतिपूज्यताम्॥ २१॥
AS we three are considered to be the best and most adorable among the gods, similarly,
the leader of the ganas i.e. Gaņeśa would be adored in future.
वयंच प्राकृताश्चायं प्राकृतः पूज्य एव च।
गणेशो विध्नहर्ता हि सर्वकामफलप्रद:। २२॥
Ganesa is the remover of the obstructions and bestows rewards of all the desires.
एतत्पूजां पुरा कृत्वा पश्चात्पूज्या वयं नरैः।
वयं च पूजिताः सर्वे नायं च पूजितो यदा॥ २३॥
अस्मिन्नपूजिते देवा परपूजा कृता यदि।
तदा तत्फलहानिः स्यान्नात्र कार्या विचारणा॥ २४॥
इत्युक्त्वा स गणेशानो नानावस्तुभिरादरात्।
शिवेन पूजितः पूर्वं विष्णुनाऽनुप्रपूजितः॥ २५॥
He would be adored first and then the people would adore us. In case the people adoring us and would not adore Ganesa, their adoration would be infructuous. There is no doubt about it. Brahma said, “Thus speaking, initially, Siva adored Ganesa, offering many things. Thereafter Visnu adored him.
ब्रह्मणा च मया तत्र पार्वत्या च प्रपूजितः।
सर्वैर्देवगणैश्चैव पूजितः परया मुदा।। २६॥
Then I (Brahma) together with Parvati and other gods, adored him with utmost devotion.
Every year on Ganesh Chaturthi after the puja we read a story, as a part of the ritual. The story I heard goes like this.
Shiva and Parvati put a race between their children Ganesh and Kartikeya. The race was to go around the world thrice and bath in all sacred rivers. The winner would be made head to all ganas. Kartikeya started on his mount (the peacock), but Ganesh knew he would not win with his mount (the mouse). So he instead circled his parents thrice and earned the equal effect of circling the world thrice.
So Ganesh won and he was made head of all ganas (Ganapati), as a reward for his intelligence he was also made head of all obstacles (Vigneshwara).
None of the answers are upto the mark.None actually has answered the question precisely.
So,here is mine:
Ganapaty has been given the status of Prathama Pujaya or first to be worshiped" by Lord Shiva as per one account and Lord Brahma as per another.
Both stories are from the Puranas.
The first story is from this chapter of Linga Purana and is as follows:
During the time when Shiva and Parvati's marriage was taking place,Brahma accompanied by Indra & other Gods approached Mahadeva:
That was the opportune time when Indra and Devas accompanied by Brahma
approached Maha Deva when Dharma and Nyaaya ( Virtue and Justice) were
at the lowest ebb and the evils perpetrated by Daitya-Danava-Rakshasas
were abysmal. There were no barriers (Vighnas) to immorality and
wickedness and the malevolent forces on Earth had a free play enabled
by extremities of Tamasika and Rajasika Gunas. Rishis felt that
besides obstructing such rampant free play of Evil, there should also
indeed be a Facilitator of Good Deeds viz. Avighna as opposed to
Vighna. For instance the well-meaning persons should not face
obstacles in their Yagnas, Daanas, Vratas, Kshetra Darshanas and such
virtuous deeds and ‘Mangala Karyas’ or of Auspicious Tasks:
Thus Devas requested that a Personification viz. Vighnesha be created
who would give impediments to the Evil-doers and Facilities to Seekers
of Good Deeds like women folk to grant good sons, humans to be blessed
with Karya Siddhi or Fulfilment of Good Deeds
Then the Devas offered a prayer or Stuti addressed to Lord Shiva.Lord Shiva obliged:
As Devas made the above Stuti, Pinakapaani was extremely delighted and
assured that he would neither allow any obstruction to Deva Karyas to
be caused by any Daitya-Danava and such other mischievous forces nor
encourage the success of any evil against virtue. Then Shiva Himself
assumed the Golrious Form of Ganeshwara Swarupa of an Elephant Head
or Gajaanana and of a Trishula Dhari and there were reverberations of
Victory sounds and rains of scented flowers from the Skies and all
Lokas above and from all over the Yogis, Siddhaas and Sages welcoming
the Lord of Vighnas and Avighnas as per his descretions and the
strength of one’s own deeds. As the Bala Ganapati prostrated before
his parents Shiva and Parvati, the latter posted kisses on the son’s
head ......Shiva emphasised to Ganesha that any Puja to him, Vishnu
or Brahma or other Devatas or Devis must be preceded by worhip to
Ganesha first not only to assure success of the main Puja but also
supplement the fulfillment of the desires for which the main puja was
performed. The Prathama Puja to Ganesha should be also done with
Dhyana-Avahana-Pushpa-Gandha-Dhupa-Deepa-Naivedyas just as the Main
Devata of the Puja was to be performed.This is relevant to all
Varnas of Brahmana-Kshatriya-Vaishya and others too. Thus any
worship, or Vrata, or Sacred and Religious Deed like Yagnas, Daanaas,
Vivaahas, Upanayanas, Vidyaarambhas, house constructions, or for that
matter any and every task seeking propitiousness shoud start with
Ganesha Puja in Hindu Dharma
As Devas faced a strange problem of recurring failures as and when
they take up a fresh assignment whereas Demons seemed to be going
ahead with novel operations, they approached Lord Siva and Devi
Parvati to provide a solution. In reply Bhagavan Siva started thinking
that among the Panchabhutas (Five Elements), there was an identifiable
personification of a Deity among Prithvi (Earth), Varun (Water), Tejas
(Fire) and Vayu (Wind God), but how was it that �Akash� (Sky) did not
have? By so thinking Lord Siva laughed loudly and Devi Parvati could
guess by her Jnana Shakti (Power of Knowledge) what Bhagavan was
laughing boisterously about. From that energetic hilarity with an open
mouth emerged a replica of Siva who was strong, handsome and powerful
whom Devi Parvati kept gazing and got mesmerised. Lord Siva got
annoyed by the instant reaction of Devi Parvati, became jealous of the
Super Boy and infact got angry and cursed him saying that he would
possess an elephant face, disproportionate belly
Needless to say that boy is Gajanana or Lord Ganesha.
And then an Akashvani happened which said:
...and Lord Brahma flew over the Sky and as �Akashvani�( a loud
announcement from the Sky) declared that Devas should be grateful to
Lord Siva to have provided the solution to the problem posed by them
and that the various forms of Vinayak which got materialised would
indeed ensure that as and when Devas ( and human beings) initiated a
task they should invoke the blessings of Vinayak foremost. As the
announcement from Brahma was heard, Siva was by then cooled down and
addressed Vinayaka endearingly as Vinayako Vighnakaro Gajasyo Ganesha naamaacha Bhavasya Putrah, Yethecha Sarvam thava yanthu Bhruthya Vinayakayaah Kruura drishtah Prachandah-Vucchushma daanaadi vuvruddhva dehaha Karyeshu siddhim prati paadayanthah, Bhavaamsva Deveshu thadha makeshu kaaryashu chanteshu Mahanubhavat-Agreshu Pujam Labhatenyatha cha Vinashayishyastatha kaarya siddhim� ( Hey Putra! Vinayaka, Vighnakara, Gajavadana, Ganesha, Shankara Putra; all these cruel-eyed, harsh and angry Vinayaks will be your servants; those who are desirous of giving well earned materials as �daanas� or alms be provided with Siddhis or boons. At Yajnas or various Propitious Tasks, all the devotees shall be provided the highest veneration, lest their tasks or worships be discounted
Hence, its a directive from scriptures only that Ganesha has to be always worshiped first.
Why is Lord Ganesha Worshipped first before any Puja?
An another interesting account of how Ganesha got the right of being worshipped before all other deities comes from Brahmanda Purana- Vol. 4 -Uttar Bhaga - Lalita-mahatmya -Chapter - Twenty Seven - The Exploits of Gananatha.
According to Brahmanda purana story this is the boon given to Ganesha by goddess Lalita in her fight with Asura Bhanda and Lord Ganesha destroyed great yantra called "Jayavighnain"and an asura called "Gajasura".In this battle goddess Lalita slained Bhandasura. Lalita-mahatmya of Brahmanda Purana is a dialog between Sage Agastya and Hayagriva.
Brief account of the Story -:
We all know the story of Lord Shiva burning Kamdeva or Madana. The Brahmanda purana story tells us that after Lord Shiva's burning of kamadeva Citrakarma, the lord of Ganas created a man of wonderful form from the ashes of Kamadeva.
On seeing the ashes of the Cupid, Citrakarma, the lord of Ganas , made a man of wonderful form by means of those ashes.(Chapter 11- Verse 30)
After creating this form , Ganapati asked him to worship Lord Shiva and taught him the mantra "Satarudriya" , he recited "Satarudriya hundred times and Lord Shiva Got pleased with him and asked him to choose any boon he liked .
This man asked a boon that half of his opponents power in the battle will be united with himself and his arrows will make the opponents missiles and weapons futile. Lord Shiva granted the boon after thinking and said "Bhanda-Bhanda".
And this man created by Citrakarma is came to be known as Bhandasura. Since Bhandasura was borned from the fire of anger of Rudra he became Danava of dreadful nature.
Sukracharya crowned Bhandasura and He presented him an umbrella formerly made by Brahma. himself. People seated in its shade were never affected by even crores of missiles. Alo given him bow named Vijaya and a conch called 'the killer of enemies.
Bhandasura was very keen on worshiping Lord Shiva and conducted all vedic activites for sixty thousnd years. After that time has passed. And after seeing the increasing power of Bhandasura over Indra Lord Vishnu created Maya (Mohini) and asked her to reside inside Bhandasura. After that Bhandasura got possessed by Maya , he forgot the Vedas and lord Siva too and forsook Yajnas and other auspicious rites.
Then Sage Narada went to Indra and said to him that if Bhandasura was liberated from Maya of Lord Vishnu ,he will burn all the three worlds like fire and its necessary to kill that demon. This task can only be carried out with the Adi ParaShakti ( Supreme Goddess , Lalita) . Indra then went to Himalaya and praised Lalita with Hymns along with great worship. Adi Parashakti manifested as goddess Lalita and married Kameshwara (Lord Shiva)(Shiva+Shakti always together).
A fierce battle was raised between goddess Lalita and Bhandasura along with all gods and demons.
Devi Lalita Creating Lord Ganesha from her smile
68 In the mass of lustre of her smile, a certain god became visible. His face had the features of an elephant. Ichor was oozing
from the middle of his temple.
77-82 The elephant-faced lord, with unimpeded vigorous roar issuing
forth from his throat, had in the night destroyed the Jayayantra
created by him. On hearing this news, Bhanda became greatly agitated.
That elephant-faced lord created numerous other elephantfaced heroes
similar to himself in features.
98 Then (Visukra ) became highly furious. Standing in front of his army, he sent a Gajasura (An Asura in the form of an elephant) against
101 Alone and single-handed that leader ofheroes with a mouse for his vehicle moved about (in the battle-field) and smashed Gajasura along
with his seven Aukshani of soldiers.
And then Devi Lalita pleased with Lord Ganeshas bravery in battle gave him the boon.
Lalita devi giving boon to Lord Ganesha to be worshiped first.
102 After Gajasura had been killed and Visukra had fled , Mahaganapati
went to the presence of Lalita from the battlefield.
104 Highly pleased the great queen granted the following boon to
Ganapati viz. : the right of being worshipped before the worship of
all other deities.
So according to Brahmanda Purana Goddess Lalita granted the this boon of right of worshipped before the worship of all other deities to Lord Ganesha. The whole interesting story is in between chapter 11 to 30 of Lalita-mahatmya of Brahmanda Purana.
This post also provides some insight about why we worship Ganesha before starting any auspicious work , Venture ,Puja etc. i.e. to remove obstacles coming in the way of that work and to get blessings of Ganesha about growth and prosperity in the same.
What I have come across is that many devotees don't know why they worship Lord Ganesha before other deities. Many seem to know the legend behind the elephant head. Once Lord Shiva came to know who Ganesha was and in order to pacify his wife, Parvathi, Lord Shiva graced Ganesha with the boon that all the devotees will worship him before anyone else. Hence, he is considered to the God of new endeavors.
I have read of two different theories that explain why Ganesh ji is worshiped before any puja. Both these stories are also linked to the story of the birth of Ganesh ji.
Probably the most common story of Ganesh ji's birth is the story of his creation by Parvati devi so he could guard her palace in Mount Kailash.
As Parvati devi was taking bath, Mahadev Shiv ji returned home but was stopped from entering the palace by Ganesh ji who wanted to protect the promise he had made to his mother Devi Parvati.
Angered by Ganesh ji's challenge and unaware that he was Devi Parvati's son, Mahadev Shiv attacked Ganesh and destroyed his head. Later, when Parvati ji realized what had happened, she was angry and threatened to destroy the world. She declared that she would stop her rampage only if Ganesh was brought back to life and then declared as equivalent to the foremost Gods.
Realizing his folly, Shiv bhagwan offered to correct his mistake and requested Vishnu ji to fetch the head of the first living creature facing in the north direction that the latter spotted. This happened to be an Elephant.
Soon after, Ganesh ji was brought back to life with an Elephant head by Shiv bhagwan and was declared to be the foremost Hindu God who was to be worshiped before all other Gods. As a result, Ganesh ji is worshiped at the beginning of every puja till date.
This version of the story talks about the demon Gajasura (Elephant headed demon) who after painful penance to Shiv bhagwan was granted an armor that nobody in the world could destroy. Gajasura went on a rampage torturing the residents of the planet and slowly beginning to challenge the Gods.
He also continued with his penance to Shiv bhagwan who once again offered to grant him a wish. This time, Gajasura decided to play a trick on Shiv bhagwan and requested the latter to take residence in his stomach. Unable to see through Gajasura's trickery, Shiv bhagwan agreed. (this is also why Shiv ji is called Bhole-nath i.e. a simpleton who is unable to see through tricks).
When days later, Parvati Devi was unable to track her husband Shiv ji, she approached Vishnu bhagwan for help. Vishnu ji being omniscient knew what Gajasura had done and so he disguised himself as a comedian with Nandi (the follower of Lord Shiva) transformed as a bull.
Vishnu ji, in his disguise, and Nandi approached Gajasura and performed a comedy play for the latter. Pleased by the entertainment, Gajasura looked at Vishnu ji in disguise and offered to grant any wish that the latter asked for.
Taking advantage of this, Vishnu ji asked Gajasura to free Shiv bhagwan from his stomach. At this moment, Gajasura realized that the performer had to be Vishnu ji because nobody else could have known that Shiv bhagwan was locked in his stomach.
He agreed to free Shiv ji by tearing his stomach but in return asked Vishnu ji and Shiv ji to grant him another wish. He requested that he be remembered by all residents of the earth for eternity and that they all worship his face.
To grant his wish, Shiv ji called his son Ganesh and replaced his head with that of Gajasura. Further, Shiv ji declared that Ganesh be worshiped before all other Hindu Gods thus ensuring that Gajasura's name continued to be remembered by one and all for eternity.
As a result, Ganesh ji is worshiped before every puja as a fulfillment of Gajasura's wish to Shiv bhagwan.
Like any library, Hinduism Stack Exchange shares great information, but does not offer personalized advice, and does not take the place of seeking such advice from any Acharya, Pundit, astrologer, Guru or other trustworthy Counselor.