Gerwig was born on 2 May 1820 and attended the Großherzogliches Polytechnikum (now known as Karlsruhe Institute of Technology) where he studied civil engineering, primarily road construction.
In the 1860s, Gerwigs attention and professional skills turned toward rail transport. He was one of the principal designers of the Black Forest Railway, which avoided steep grades through the use of numerous loops and curved tunnels. He applied the principle again for the Gotthard Railway at the double loop of Wassen.
His last rail project was the Höllental Railway, also in Germany"s Black Forest region.
Later in life, Gerwig turned to politics. He was active in the government of Baden.
He also served as the first director (since 1850) of the Clockmakers School (Uhrmacherschule) in Furtwangen. In 1852 he began collecting clocks.
His collection formed the basis for "Study Collection" of the school and eventually became the German Clock Museum (Deutsches Uhrenmuseum).