‘Kashi (Uttar Pradesh) has thousands of temples out of which 56 are those of Shri Ganesh, the special one being that of Shri Dhundiraj Vinayak.It is believed that one should pay obeisance to Shri Dhundiraj Vinayak after doing circumambulation (parikrama) at Kashi. This idol is present at the entrance to the Kashi Vishwanath temple. The Skand Puran has glorified the greatness of the Kashi region. We narrate here the story of how Shri Ganesh arrived in Kashi, the seat of Bhagwan Shiva.
1.The righteous ruler of Kashi Divodas
asked Bhagwan Brahma for a boon not allowing
Deities to visit the Kashi region, Deity Brahma complied
with a restriction that this would happen if he ruled with excellence
During that period Bhagwan Shiva was residing in the Mandarachal Mountain and Kashi was being ruled by Divodas, an extremely righteous ruler. Every subject from his kingdom was leading a happy life. This region was enriched with opulence everywhere. The king had asked Bhagwan Brahma for a boon preventing Deities from entering Kashi during his reign and from ruining the excellent atmosphere he had created there. Bhagwan Brahma agreed but with one restriction that the king had to prove himself as an excellent and capable administrator and that he would have to give excellent treatment to all residents and visitors to Kashi to which the king agreed and complied.
2.Plans made to find errors in the administration
of king Divodas to enable Bhagwan Shiva to visit Kashi
Kashi is the seat of Bhagwan Shiva yet due to the blessing of Bhagwan Brahma to king Divodas, Bhagwan Shiva was compelled to stay away from Kashi for a long time. Now for Him to go to Kashi there was need to find some error in the administration of King Divodas. So He sent the Yoginis, Sun Deity and other servitors to Kashi to accomplish this mission.
2A.The 64 Yoginis began to reside in Kashi as if heaven had descended there
Bhagwan Shiva sent the 64 Yoginis to Kashi to disrupt the administration there but they were so enticed by its beauty and pleasant atmosphere that they began to feel that they were in heaven itself. So instead of disrupting the state of Kashi they began to live there happily.
2B. Attracted to Kashi the Sun Deity assumed 12 forms and entered Kashi
Bhagwan Shiva sent the Sun Deity to Kashi with the intention of making him disrupt its administration. So assuming different forms of astrologers, scholars, traders, priests etc. He lived there and tried to find fault in the administration but was unable to do so in either the residents of Kashi or in the rule of King Divodas. Attracted by its righteous atmosphere and beauty the Sun Deity too decided to live there. He felt that if he returned to Mandarachal then he would invoke the wrath of Bhagwan Shiva for not completing the allotted task. On the other hand if he continued to live here without his permission then he would incur sin. However if he performed religious acts in Kashi then these sins would easily get expiated.’ Thereafter he lived disguised in 12 different forms in various parts of Kashi.
2C. Shri Ganesh performed the mission of
disrupting the administration of Kashi in the garb of an astrologer
After the Sun Deity Bhagwan Shiva sent his servitors to Kashi for the same mission but allured by the beauty of Kashi they too remained there. Finally Bhagwan Shiva summoned His son, Shri Ganesh to accomplish this task of posing obstacles in the administration of King Divodas. Disguised as an astrologer Shri Ganesh arrived in Kashi. He would give people visions in dreams and meeting them the following day to explain the meaning of the dreams to them. In this way he created an impact on the minds of residents of Kashi.
Gradually his fame reached the palace. As the days went by the queen too got influenced by his tales of fame and told the king about his old astrologer. With his consent she invited him to the court of the king. The king honoured him a sper tradition and requested him to made predictions of the future. After indepth contemplation he told different aspects about the king and his kingdom. He also warned the king that 18 days later a Brahman (priest) would approach him and give some serious advice which he should heed and then left his palace. Later assuming the form of a Brahman with his sharp intellect, he convinced the king to reduce his attachment unto the kingdom.
3. After arriving in Kashi Bhagwan Shiva praised Shri Ganesh
When King Divodas went into the stage of a retired householder (vanprasthashram) on the order of Shri Ganesh, Deity Vishwakarma rebuit the Kashi region after which Bhagwan Shiva along with all His messengers arrived there from Mandaranchal Mountain. Here He was referred to as ‘Kashi Vishwanath’. After His arrival the first thing that Bhagwan Shiva did was the praise of Shri Ganesh. Reciting the Dhundiraj Holy verse (stotra) he said, “Here Shri Ganesh will become popular as Dhundiraj. Every devotee who comes to pay obeisance to Kashi Vishwanth will receive all blessings from Me if they pay obeisance and worship Dhundiraj Vinayak before Me.” Thereafter Shri Ganesh began to live in Kashi assuming 56 differnt forms.
Shri Dhundiraj Vinayak was then installed at the entrance to the temple of Kashi Vishwanath. Not only does Kashi Vishwanath rush to the rescue of His devotees but Shri Dhundiraj Ganesh who accomplished the mission of bringing Him to Kashi also loves His devotees. It is said that without worshipping Shri Dhundiraj Ganesh a pilgrimage of Kashi remains incomplete, such is the greatness of this form of Shri Ganesh.’
(Reference : varanasitemples.in)