What is the story of Grihpati avatar of Lord Shiva? Why was he born and who were his parents?
A Brahmin named Visvanara and his wife Shuchismati lived on the banks of Narmada river. Even after a long period of married life, they did not have a child. So proceeded to Kashi and prayed to Lord Siva. Siva appeared before Visvanara, blessed him and promises to taken birth as their son.
In due course of time, Shuchismati gave birth to a beautiful child.Lord Brahma named the child as Grihapati. He started learning the Vedas in the traditional way and within one year, he became proficient in all the Vedas and other sacred texts.
When Grihapati attained the age of nine, Narada came and said that Grihapati would have a fear of fire. Grihapati then consoled his parents and proceeded to Kasi to do penance in order to avoid death. In Kasi, Grihapati found out an auspicious place and placed a Shivalinga there. Beside the Sivaling, he commenced his penance with prayers.
On knowing about the act of Grihapati, Lord Indra arrived there and blessed him. He requested him to demand anything he wished as boon. However, Grihapati refused to demand anything. Indra became furious upon this and tried to attack him with his Vajrayudha (weapon Vajra). Grihapati was very much frightened. He prayed to Lord Shiva for protection.
Immediately, Lord Siva appeared before him. On seeing Bholenath, Indra was forced to retreat from the scene. Mahadeva blessed Grihapati and said – “Do not be afraid of this Vajra of Indra. No Vajra would be able to kill you.”
Chapter.13 (Section 3 - Śatarudra-saṃhitā of Shiva Purana)