Avalanche photodiodes (APDs) are promising light sensor for various fields of experimental physics. It has been argued, however, that variation of APD gain with temperature could be a serious problem preventing APDs from replacing traditional photomultiplier tubes (PMTs) in some applications. Here we develop an active gain-control system to keep the APD gain stable under moderate temperature variations. As a performance demonstration of the proposed system, we have tested the response of a scintillation photon detector consisting of a 5x5 mm^2 reverse-type APD optically coupled with a CsI(Tl) crystal. We show that the APD gain was successfully controlled under a temperature variation of DT = 20deg, within a time-cycle of 6000 sec. The best FWHM energy resolution of 6.1+-0.2 % was obtained for 662 keV gamma-rays, and the energy threshold was as low as 6.5 keV, by integrating data from +20deg - 0deg cycles. The corresponding values for -20deg - 0deg cycles were 6.9+-0.2 % and 5.2 keV, respectively. These results are comparable, or only slightly worse than that obtained at a fixed temperature. Our results suggest new potential uses for APDs in various space researches and nuclear physics. As examples, we briefly introduce the NeXT and Cute-1.7 satellite missions that will carry the APDs as scientific instruments for the first time.