In underground coal gasification, crude gas carrying coal ash and cinder has a serious significant erosion effect on the gas extraction area of a wellhead device. To study the erosion of the wellhead device, based on the gas-solid two-phase flow theory, this study uses the discrete phase model to describe the kinematics and trajectories of discrete solid particles and uses the Reynolds-averaged Navier-Stokes equation to calculate the fluid dynamics of the continuous phase. This study determines the main erosion position and the maximum erosion angle range of the wellhead device through numerical analysis, as well as the influence of the changes in solid particle size, particle mass flow rate, and crude gas flow rate on the erosion rate, and predicts the service lifetime of the small four-way and side valve I. The gas-solid erosion experiment verified the maximum erosion angle of the wellhead device. The experimental results were consistent with the numerical analysis results. This study also proposes an optimization method of surfacing to reduce the erosion of gas-solid two-phase flow on wellhead devices. The results show that the inner walls of the small four-way and side valve I are the most eroded. Factors such as particle size, particle mass flow rate, and crude gas flow rate have a greater impact on the erosion rate of the device, and the particle size has the greatest impact. Surfacing the severely eroded area of the wellhead device can effectively reduce the erosion and wear of the wellhead device caused by the gas-solid two-phase flow. This study provides guidance for the reasonable prediction and effective protection of severe erosion areas of wellhead devices.