Gerrit Viljoen was born in Cape Town on 11 September 1926 to Helena and Hendrik Geldenhuys Viljoen. At the time of his birth his father was the editor of Huisgenoot Magazine. After his family relocated to Pretoria, Viljoen started his schooling at Pretoria Oos Laerskool from 1933 to 1939. He also attended the Afrikaanse Hoer Seunskool in Pretoria and matriculated in 1943. He enrolled at the University of Pretoria, where he completed a master’s degree in Classics and LLB. While at University of Pretoria, Viljoen played an active role in politics and served four years on Students Representative Council (SRC). He was also instrumental in the formation of a United Afrikaans students’ Organisation in 1948.