Schmidt was born in Berlin in 1919 and went to high school in Munich, where his father was a professor of chemistry. Being the son of a Jewish mother, Gerhard was forced to leave Germany at the age of 16, after the Nazis came to power; he spent a year in Switzerland, then moved to England, where he finished high school in 1938. He then won a scholarship to study at the University of Oxford (Oriel College). He earned a master's degree in organic chemistry in 1942 under the guidance of Robert Robinson, and a doctorate in X-ray crystallography under Dorothy Hodgkin in 1948. Both of his supervisors were later awarded Nobel Prizes in chemistry.
During his doctoral studies, Schmidt took part in structural studies of biologically important molecules, focusing on the structure of the antibacterial natural peptide Gramicidin S using the method of X-ray crystallography. During this period he supervised another student of Hodgkin, Margaret Roberts, later Margaret Thatcher.
After the breakout of World War II, Schmidt was forced to interrupt his studies. Being an emigrant from Germany, he was deported in July 1940, together with 200 other “enemy aliens,” to a detention camp in Australia. In August 1941, he was finally cleared and returned to England. Later in life, Schmidt liked to date some of his most original ideas in chemistry to this deportation period.