Gustavs Vanags was born in "Rungas" house of the Schnicken (Sniķeru) manor (now in Ukri Parish, Auce Municipality). He received primary education in the Mitau Classic Gymnasium, and in 1910 enrolled Riga Polytechnic Institute. During the First World War, he, among many, went in evacuation to the inner regions of Russian Empire; after returning from it in 1921, he completed his education in the new-founded University of Latvia and worked at the Faculty of Chemistry, raising to the position of the chair of the Department of organic chemistry. He received his habilitation in 1932.
After Riga Polytechnic Institute was reestablished in 1958, G. Vanags moved to it, serving in the same position as the department chair until 1965. Simultaneously he also worked in the State Institute of Organic Synthesis, where he carried out his research in the chemistry of cyclic β-diketones. He was founder of Riga scholl of organic chemists specializing on β-diketones, which continues up to day (2020). Gustavs Vanags, along with his students, designed and synthesized several compounds of notable application in medicine, agriculture and chemical analysis (omefin, bindon, nitroindandione, rhodenticide diphenadione or ratindan).
Gustavs Vanags died in a sudden death on May 8, 1965, in Riga. He was buried in the Forest Cemetery.