In recent years, frequent linkage events of natural gas and electricity prices have seriously affected the stability of the energy supply market. In view of the increasingly close linkage relationship between gas and electricity prices, a gas–electricity price linkage analysis method considering the benefit–cost and price transmission of gas units is proposed. Firstly, a benefit–cost model of gas units based on risk premium theory is constructed to reflect the willingness of gas units to offer prices in different market environments. Secondly, a vector error correction model (VECM)-based gas–electricity price conduction analysis method was proposed to study the long-term co-integration relationship between gas–electricity prices and the short-term fluctuation conduction process. Then, aiming at the problem of delay in price transmission, a time-delay analysis method of gas–electricity price based on the attention mechanism is proposed. Finally, the gas price index and average gas power price data of China from August 2020 to November 2022 are used to verify the validity of the proposed model; the numerical results show that the proposed method can determine the long-term stable fitting relationship between gas and electricity prices, and can also analyze and judge the conduction direction of gas and electricity price fluctuations in different time periods.