In this paper, an enhanced linear inverted pendulum model (LIPM) and a gait planning algorithm are proposed. The LIPM is a widely used concept for gait reference generation, and it provides a simplified model for planning a center of mass trajectory when given a proper zero moment point trajectory. However, one of the assumptions of LIPM is that the legs of the robot are massless, so that the mass of the supporting leg can be neglected for simplification, and it conflicts with the mass distributions of human beings and most humanoid robots. Hence, this paper proposes a double-link LIPM (DLIPM) to eliminate the conflict about mass distribution. In addition, a gait planning algorithm is proposed for natural walking reference generation. In the simulation results, the proposed method is implemented based on a model of a teen-sized humanoid robot named David Junior. The simulation results validate the feasibility and practicability of the proposed method. Moreover, comparisons between conventional LIPM and DLIPM demonstrate the performance of the proposed DLIPM method. Eventually, the proposed method is implemented on David Junior for the weight-lifting event in the 2015 FIRA RoboWorld Cup, an event which David Junior won first place.