This is the story of the demon after whom the city is named.
A demon named Gayasura once started to perform tapasya. Such was the power of his tapasya that the Devtas started to worry about the intentions behind this extreme penance. They went to Vishnu and sought his help. Vishnu pacified the Devtas went to Gayasura to grant him a boon.
“Grant me the boon that I may become the most sacred of all tirthas,” replied the daitya.
The boon was granted and Gayasura disappeared. Vishnu then instructed Brahma and the Devtas to perform a sacrifice. He also asked them to go to Gayasura and ask for his body so that the sacrifice might be performed on it. As soon as Gayasura agreed, his head fell off from the body. Brahma then proceeded to perform the sacrifice on Gayasura’s headless body. But as soon as the sacrifice started, the body began to shake.
To overcome this hiccup it was decided that all the Devtas along with Vishnu would enter a stone which would be placed on Gayasura’s body so that the body would not shake.
Gaya is sacred because it is believed that through this stone the gods and Vishnu are always present in Gaya.
Now, let’s look at the story behind this stone.
The sage Marichi was Brahma’s son and had married Dharmavrata. One day Marichi went to the forest to collect wood and flowers and returned extremely tired. He called Dharmavrata and said, “I am very tired. Wash my feet.”
Dharmavrata began to wash Marichi’s feet when Lord Brahma suddenly arrived. Dharmavrata did not know what to do. Should she finish washing her husband’s feet? Or should she first attend to Brahma, since Brahma was Marichi’s father?
She decided to attend to Brahma first. Marichi became very angry on seeing this and cursed Dharmavrata converting her into a stone. Dharmavrata performed tapasya for many years to overcome this curse. Vishnu was pleased at Dharmavrata’s meditation and offered to grant her a boon.
Dharmavrata wished that the curse imposed on her by Marichi might be waived. Vishnu explained that this was not possible, since Marichi was a very powerful sage. However Dharmavrata was granted a boon that her stone form would be so powerful that it would be desired even by the Gods and that all the gods would be always present inside this stone. It was this stone that was placed on Gayasura’s body.