Summary Gel treatment is often used for water shutoff in high water-cut oil or gas wells. Although the properties and usage methods of gel have been well documented by different investigators, gel treatment performance is not always satisfactory in field application, especially in oil or gas reservoirs with complex conditions, such as strong bottomwater reservoirs, high-permeability-ratio oil reservoirs, and fractured gas reservoirs. In this work, we attempt to improve gel treatment application in complex situations according to the causes of disappointing performance, including unreliable numerical simulation and the misapplication of experiences. We propose a new numerical simulation method of gel treatment mechanisms and verify it by improving the acquiring method of inaccessible pore volume (IAPV), dynamic polymer adsorption (DPA), and the simulation method of disproportionate permeability reduction (DPR). The performance and optimization measures of gel treatment in different types of complex oil and gas reservoirs are discussed extensively. Moreover, the dominant influencing factor of the gel treatment effect is determined by gray relation analysis to provide more direct and effective suggestions for field application. The results suggest that the improved access methods for IAPV and DPA can help to obtain more precise parameters easily to construct a numerical gel model. In addition, the new DPR simulation method, which considers oil or gas blocking, reduces the overestimation of gel DPR ability obtained with the conventional method. The misapplication of gel treatment experience probably causes a disappointing response, for example, gel treatment time had opposite influences on water shutoff in strong bottomwater reservoirs and high-permeability-ratio oil reservoirs, and the experience of reservoir thickness in oil reservoirs was not suitable for gas reservoirs. Furthermore, the major factors of gel treatment are varied in different oil and gas reservoirs, demonstrating that primary evaluation indicators for candidate wells are not permanent.