Corrosion has been responsible for several gas pipeline leakage accidents; thus, clarifying its failure mechanisms is a precondition to prevent such accidents. On the basis of failure analysis of corroded pipe sections, laboratory exposure tests were conducted by simulating three possible corrosion environments inside a gas pipeline. The corrosion rate indicated by depth change was adopted in this study. Scanning electron microscopy and X-ray diffraction were used to analyze corrosion products. Results showed that the specimens completely immersed in condensate water were generally corroded and that the specimens exposed to gas were locally corroded. However, the corrosion rate of the latter was slightly lower; hence, no autocatalysis of occluded corrosion cell occurred in the formation of corrosion pit, and uniform corrosion occurred in the precipitation location of condensate water. The areas in the range of 5 mm below the waterline indicated severe corrosion, and the rate could reach twice that of other areas. The corrosion products were mainly FeO(OH) and FeCO3, thereby proving that the corrosion failure of pipelines was caused by oxygen absorption corrosion and CO2 corrosion. Suggestions were presented to control corrosion failure of associated gas pipelines.