Ertl was born in Stuttgart, Germany, where he studied physics from 1955 to 1957 at the Technical University of Stuttgart and then at the University of Paris (1957–1958) and Ludwig Maximilian University in Munich (1958–1959). He completed his Diplom in Physics at the Technical University of Stuttgart in 1961, followed his thesis advisor Heinz Gerischer from the Max Planck Institute for Metals Research in Stuttgart to Munich and received his PhD degree from the Technical University of Munich in 1965.