Due to the large size and large span of heavy-duty machine tools, the structural deformation errors caused by gravity account for a large proportion of the static errors, and the influence of gravity deformation must thus be considered in the machine tool precision design. This paper proposes a precision design method for heavy-duty vertical machining centers based on gravity deformation error modelling. By abstracting the machine tool into a multibody system topology, the static error model of the machine tool is established based on the multibody system theory and a homogeneous coordinate transformation. Assuming that the static error of each motion axis is composed of two parts, i.e., the manufacturing-induced geometric error and the gravity deformation error, the machine tool stiffness model of the relationship between gravity and deformation error is developed using the spatial beam elements. In the modelling process, the stiffness coefficients and volume coefficients of the components are introduced to fully consider the influences of structural parameters on machine tool precision. Taking the machine tool static precision, the component stiffness coefficients and the volume coefficients as the design variables, based on the use of the worst condition method, error sensitivity analysis and global optimization algorithm, the optimal allocation of the static error budget of the machine tool and the structural design requirements of each component are determined, providing a valuable guide for the detailed structure design and manufacture processing of the machine tool components.