For most of its history the Gita was not a book. It was an episode, read within the epic and expounded within Vedanta, and its authority came from being treated as one of the three foundations that any Vedanta teacher had to interpret.
That commentarial tradition is where its status was made. Shankara's commentary, from around 800 CE, is the oldest complete one surviving, and reads the Gita as finally teaching knowledge, with action preparatory. Ramanuja in the eleventh and twelfth centuries read the same verses as teaching devotion to Vishnu as the highest path, with the self real and distinct though dependent. Madhva in the thirteenth read them as asserting an unbridgeable difference between God and soul. Abhinavagupta gave it a Shaiva and tantric reading. Jnaneshvar's Marathi Jnaneshvari, from the late thirteenth century, took it out of Sanskrit entirely and is a monument of Marathi literature in its own right.
Its career as a standalone scripture is recent and largely colonial in occasion. Charles Wilkins translated it into English in 1785, the first Sanskrit text rendered directly into a European language, and Edwin Arnold's verse version, The Song Celestial, appeared in 1885. Gandhi read it first in Arnold's English, as a student in London, and it became the book he returned to daily; his own commentary, Anasakti Yoga, was published in 1929, and he read the war allegorically, as the struggle within a person, in explicit service of nonviolence. Bal Gangadhar Tilak's Gita Rahasya, written in prison and published in 1915, read it the opposite way, as a mandate for action, and revolutionaries carried it as such. Aurobindo, Vivekananda and Radhakrishnan each produced readings. A text that had been a chapter of an epic became, within a century and a half, the volume most likely to be handed to an outsider as the scripture of Hinduism.