Polymer gels suffer from a serious syneresis issue when exposed to high-temperature and high-salinity (HTHS) conditions, which limits their use as water-treatment agents in this type of reservoir. In this paper, the effects of the polymer type/concentration, deoxidizers, and stabilizers on the long-term stability of polymer gels were systematically studied; thus, the methods to develop stable polymer gels for two typical levels of salinity were optimized. The results show the following: (1) For a medium-salinity condition (TDS: 33,645.0 mg/L) at 125 °C, conventional HPAM gels completely dehydrate within only 1 day, and the addition of a deoxidizer hardly improved their stability. Some special polymers, e.g., AP-P5, MKY, and CPAM, are able to form stable gels if a high concentration of 0.8% is used; the syneresis rate of these gels is about 10% after 30 days. However, the addition of the complexant sodium oxalate significantly improves the stability of gels formed by all five of these different polymers, which behave with a 0% syneresis rate after 30 days pass. Complexants are the most economical and feasible agents to develop stable gels in medium-salinity water. (2) Gels enhanced using the methods above all become unstable in a more challenging ultra-high-saline condition (TDS: 225,068.0 mg/L). In this case, special calcium- and magnesium-resistant polymers are required to prepare stable gels, which show 0% syneresis rates after 30 days, have relatively low strengths, but do produce a good plugging effect in high-permeability cores.