In order to improve the efficiency and effectiveness of the lightweight design of the gantry machine tool, a lightweight structural optimization design system for the gantry machine tool was constructed. Serialized gantry machine tools were parametrically modeled, and a load model with multiple operating conditions was established. A twice optimization design method integrating zero-order optimization, parameter rounding, and structural re-optimization was proposed. Using the proposed method, a lightweight structural optimization design system for gantry machine tool with parametric design, lightweight design, and other functions was developed. The developed gantry machine tool lightweight structural optimization design system was applied to complete the lightweight structural optimization design of gantry frame of a certain gantry machine tool, so the structural parameters of the gantry frame were optimized. Although the maximum stress and the maximum deformation of the gantry frame increases within the allowable range, the experimental comparison before and after the optimization shows that the mass of the whole gantry frame is reduced by 9.24%, which is beneficial to save the manufacturing cost. The research results show that the constructed lightweight structural optimization design system of the gantry machine tool has high engineering practicality.