Compared with land wells, the production environment and reservoir depth of offshore oil and gas wells are more complex and shallower. Further, HPHT production fluid there will produce strong temperature and pressure disturbance that affects the wellbore, which easily generates wellbore safety problems, such as wellhead growth and leakage caused by the incompatible deformation of casing and cement sheath. Therefore, obtaining an accurate wellbore temperature and pressure field is the key to implementing a wellbore safety assessment. Based on the gas–liquid two-phase separated method, this paper established an improved calculation model of wellbore temperature and pressure field for offshore HPHT wells. This model also takes into account the heat transfer environment characteristics of “formation-seawater-air” and the influence of well structure. Compared with the measured data of the case well, the error of temperature and pressure calculation results of the improved model are only 0.87% and 2.46%. Further, its calculation accuracy is greatly improved compared to that of the traditional gas–liquid homogeneous flow calculation model. Based on this model, the influencing factors of wellbore temperature and pressure in offshore gas wells are analyzed. The results show that forced convection heat exchange between seawater–air and wellbore is stronger than that between wellbore and formation. Reducing the gas–liquid ratio of the product can effectively reduce wellbore temperature and increase wellbore pressure. The gas production has a significant impact on the wellbore temperature. When the gas production rises from 10 × 104⋅m3/d to 60 × 104⋅m3/d, the wellhead temperature rises from 63 °C to 99 °C. However, due to the mutual influence of friction pressure drop and hydrostatic pressure drop, wellbore pressure increases first and then decreases with the increase in gas production. The improved model can provide a more accurate estimate of the time to reach the rated wellhead temperature. Meanwhile, this model displays accurate theoretical support for the rational formulation of the production plan after the well opening, so as to avoid excessive restrictions on the initial production rate.