Grigory Gagarin was born in Saint Petersburg to the noble Rurikid princely Gagarin family. His father, Prince Grigory Ivanovich Gagarin (Saint Petersburg, 17 March 1782 - Tegernsee, 12 February 1837), was a Russian diplomat in France and later the ambassador to Italy. His father married in Saint Petersburg in 1809 his mother Yekaterina Petrovna Sojmonova (Saint Petersburg, 23 May 1790 - Moscow, 27 February 1873). Thus until the age 13 the boy was with his family in Paris and Rome and then studied in the collegium Tolomei in Siena. Grigory did not receive a formal artistic education, but took private lessons from the famous Russian painter Karl Briullov who at that time lived in Italy.
In 1832 he returned to Saint Petersburg, became acquainted with Alexander Pushkin and illustrated his works The Queen of Spades and The Tale of Tsar Saltan. He also became close to the opposition Circle of Sixteen and Mikhail Lermontov.
He worked as a Russian diplomat in Paris, Rome and Constantinople; stayed two years in Munich. In 1839, after his return to Russia, he – together with Russian writer Vladimir Sollogub – travelled from Saint Petersburg to Kazan. Sollogub wrote the novel Tarantas about this journey, and Gagarin illustrated it.
Gagarin also continued his friendship with Lermontov. In 1840 he followed the exiled Lermontov to the Caucasus in the Tengin Regiment in the Caucasian War. According to D.A. Stolypin, they lived together in the same tent.
They took part in the operations against the Gortsy, the native people inhabiting the mountains of the Causasus, but also continued their creative work. There are known a few works of art labeled "Lermontoff delineavit, Gagarin pinxit" (Lermontov drew, Gagarin painted). In 1841 Lermontov was killed on a duel, but Gagarin continued his military service.
In 1842 he took part in the General Chernyshyov expedition in Daghestan and served with the dragoons until 1848. He received a few orders for bravery and the military ranges of Rittmeister and Colonel.
Gagarin was married twice. His first wife was Anya Nikolaievna Dolgorukova (1823–1845), with whom he had a daughter, Princess Yekaterina Grigoryevna Gagarina (1844–1920). On 29 August 1848 he married Sofiya Andreievna Dashkova (7 July 1822 - 20 December 1908), the daughter of Andrei Vasiliyevich Dashkov and the niece of Dmitri Vasiliyevich Dashkov, a former Minister of Justice.
In 1848-1855 he lived in Tiflis serving under Mikhail Semyonovich Vorontsov. Among the military and administrative duties, Gagarin did a lot of works for the city. He built a theater there, frescoed the Tbilisi Sioni Cathedral, and restored frescoes of the old Georgian cathedrals, including the Betania monastery. By this time were born the first children from his second marriage: Prince Grigory in 1850; Princess Mariya (Tiflis, 14 June 1851 - Cannes, 2 August 1941), from whose marriage with Mikhail Nikolaievich Raievsky (1841–1893) she had beside seven other children Irina Mikhailovna Raievskaya, the morganatic wife of George, Duke of Mecklenburg; and Princess Anastasia in 1853.
In 1855 Grigory moved to Saint Petersburg to work under Grand Duchess Maria Nikolayevna, Duchess of Leuchtenberg, who was the president of the Imperial Academy of Arts. Here were born two other children: Prince Andrei in 1856; and Prince Alexander in 1858.
In 1858 Gagarin received the military rank of Major General. In 1859 he became the Vice President of the Imperial Academy of Arts, and he remained there until 1872. His last daughter, Princess Nina, was born in 1861.
Some sources list him as the President of the Academy, probably considering the Grand Duchess to be only a formal head of the institution. As the Vice President of the Academy Gagarin supported the "Byzantine style" (Russian Revival). He built the "Museum of Early Christian Art" at the Academy. Gagarin also continued to support Lermontov's poetry, staging Lermontov's Demon in the royal Hermitage Theatre (1856).
Gagarin died in Châtellerault, France in 1893.