This article describes a new procedure for automated generation of two-dimensional locally refined quadrilateral meshes of gear drives. In this new procedure, a base mesh is generated using a multiblock meshing procedure. Then, selected elements of the base mesh are subdivided to obtain a refined mesh in certain parts of the gear teeth. The proposed procedure is completed with a mesh quality enhancement technique, which is based on an optimization-based smoothing. It also includes strategies that allow to automatically identify and refine those areas of the gear that are typically subjected to elevated stress gradients. The performance of the proposed procedure is illustrated with numerical examples, and it is compared to other existing meshing procedures, both in terms of mesh distortion and accuracy of the results.