Most modern involute gears are cut using a hobb. The gear is rolled in the hobb against a hardened steel profile of its teeth.
But what did pre industrial age clock makers do. Apparently something called a Lancashire gear cutter which is a form of rotary mill.
A modern version exists called a Bergon. I found plans today for building a copy as the genuine article costs about eight thousand dollars!