Gaya has experienced the rise and fall of many dynasties in the Magadh Region. From the 6 th century BC to the 18 th century AD, about 2300-2400 years, Gaya has been occupying an important place in the cultural history of the region. It opened up with the Sisunaga dynasty founded by Sisunaga, who exercised power over Patna and Gaya around 600 BC. Bimbisara, fifth in line, who lived and ruled around 519 BC, had projected Gaya to the outer world. Having attained an important place in the history of civilisation, the area experienced the bliss of Gautam Buddha and Bhagwan Mahavir during the reign of Bimbisara. After a short spell of Nanda dynasty, Gaya and the entire Magadh region came under the Mayuryan rule with Ashoka (272 BC – 232 BC) embracing Buddhism. He visited Gaya and built the first temple at Bodh Gaya to commemorate Prince Gautama's attainment of supreme enlightenment.
The period of Hindu revivalism commenced with the coming of the Guptas during the 4 th and 5 th century A.D. Samudragupta of Magadh helped to bring Gaya in limelight. It was the headquarter of Behar district during the Gupta empire.
Gaya then passed on to the Pala dynasty with Gopala as the ruler. It is believed that the present temple of Bodh Gaya was built during the reign of Dharmapala, son of Gopala.
Gaya came under the reign of Muhamaddan rulers in the 12 th century with Muhammad Bakhtiyar Khilji invading the region. For a short period thereafter, the Pathan Chief Sher Shah ruled over the place at the end of 16 th century. The place finally passed on to the Britishers after the battle of Buxar in 1764. Gaya, alongwith other parts of the country, won freedom in 1947.
Gaya finds mention in the great epics, Ramayana and Mahabharata. Rama alongwith Sita and Lakshmana visited Gaya for offering PINDAN to their father Dasharath. In Mahabharat, the place has been identified as Gayapuri.
Gaya formed a part of the district of Behar and Ramgarh till 1864. It was given the status of independent district in 1865. Subsequently, in May 1981, Magadh Division was created by the Bihar State Government with the districts of Gaya, Nawada, Aurangabad and Jehanabad. All these districts were at the level of sub-division when the Gaya district was created in 1865. About the origin of the name ‘Gaya' as referred to in Vayu Purana is that Gaya was the name of a demon (Asura) whose body was pious after he performed rigid penance and secured blessings from Vishnu. It was said that the Gayasura's body would continue to be known as Gaya Kshetra.