Gärtner was from Schweidnitz, Lower Silesia (now Świdnica, Poland). He enlisted in the Wehrmacht in 1940 at age 19, and fought in the North African Campaign with the Afrika Korps. He was captured by Allied troops in Tunis in 1943 and was taken to the United States as a prisoner of war.