The spectral gain of a multi-stack terahertz quantum cascade laser, composed of three active regions with emission frequencies centered at 2.3, 2.7, and 3.0 THz, is studied as a function of driving current and temperature using terahertz time-domain spectroscopy. The optical gain associated with the particular quantum cascade stacks clamps at different driving currents and saturates to different values. We attribute these observations to varying pumping efficiencies of the respective upper laser states and to frequency dependent optical losses. The multi-stack active region exhibits a spectral gain full width at half-maximum of 1.1 THz. Bandwidth and spectral position of the measured gain match with the broadband laser emission. As the laser action ceases with increasing operating temperature, the gain at the dominant lasing frequency of 2.65 THz degrades sharply.