The word Gaṇa (Devanagari: गण), in Sanskrit, means "flock, troop, multitude, number, tribe, series, class" (Monier Williams's dictionary). It can also be used to refer to a "body of attendants" and can refer to "a company, any assemblage or association of men formed for the attainment of the same aims".
The word "gana" can also refer to councils or assemblies convened to discuss matters of religion or other topics.
As Shiva's attendants
In Hinduism, the gana or bhutagana are attendants of Shiva that reside in chthonic and liminal locations such as cemeteries and charnel grounds. The bhutagana also attend to Shiva on Mount Kailash. The story of creation of Virabhadra from the Shiva's lock and destruction of Daksha by Virabhadra and his ganas are popular stories from SHIV MAHAPURAN.
Many books of Sanskrit literature have used ganas and sanghas frequently. The famous Sanskrit scholar Pāṇini of 900 BCE has mentioned in his Sanskrit grammar known as Aṣṭādhyāyī in the form of shloka as जट झट संघाते or Jata Jhata Sanghate. This means that the terms 'Jata' and 'democratic federation' are synonymous.
Pāṇini in his Sanskrit grammar used gana as:
संघोद्घौ गण प्रशंसयो Sanghoddhau gaṇa praśansayo
It shows that the ganatantra (republic) system of rule was prevalent in India since ancient period.
In Shanti Parva
A detailed analysis of the GANAS obtains in chapter 108 of Shanti Parva in which Yudhisthira asks Bhisma about the ganas: how do they increase, how do they defend themselves from the dividing-policy of enemies, what are their techniques in conquering enemies and in making friends, how do they hide their secret mantras while in majority. Bhisma's answers to these questions have been recorded in the form of shlokas (verses) from 16 – 32 in Shanti Parva.,
व्रातं व्रातं गणम् गणम् Vrātam Vrātam gaṇam gaṇam
Gana in brief means an assembly. Ganatantra (republic) means a state run by assemblies.
In Buddhist literature
The Buddhist literature Mahabagga mentions that:
गण पूरकोवा भविस्सामीति Gaṇa pūrkovā bhavissāmīti
It indicates that there was an officer who used to see the number of ganas and their koram in the Rajasabha (state assembly).
During Buddhist period, the Buddhist books like ‘Pali-pitaka’, Majjhamnikaya, mahabagga, Avadana shataka have mentioned ganas and sanghas many times. During Buddhas period there were 116 republics or ganasanghas in India.
In Buddhist times, Gaṇas were assemblies of the Sanghas, early democratic republics known as Gaṇa-rājyas, literally "rule of the assembly", a term paralleling demo-kratia or soviet republic. The term was revived in Bhārata Gaṇarājya, the official name of the Republic of India.