This paper presents the design and experimental study of a geared five-bar module for the gravity compensation of a rotating mass. In this design, a compression spring is installed on the rotating link and a pair of spur gears are used to transmit the elastic force to counterbalance the gravitational force. The design problem is first formulated as an optimization model for minimizing the actuation torque and then simplified to an analytical equation for approximating the perfect compensation design. One unique feature of the study is that the friction effect of the meshing gears is considered in the design of the spring stiffness. A prototype of the proposed mechanism was built and experimentally investigated via the manual and motor-driven tests. In the manual test, the measured peak static motor torque due to gravity was reduced up to 84.3% with the spring attachment. On the other hand, in the motor-driven test, the measured peak motor torque was reduced up to 90% and 72.8% during the downward and upward motions, respectively, and the power reduction rate of the driving motor could achieve up to 86.5% within the overall range of motion.