The construction of jointless track and rail repair need a higher efficiency and better quality solution. At present,flash butt welding,gas pressure welding,thermite welding and arc welding are the main solutions,but there are some limitations in the use environment and joint quality. This paper introduces the application of the automatic welding system of narrow gap gas protection in rail welding,and verifies the feasibility of the welding method of narrow gap gas protection in the early stage. The automatic welding system of narrow gap gas protection is composed of the small robot of FANUC company and the welding power supply of Shandong Aotai company. It is welded with the welding method in a specific swing way,the welding seam is well formed,and the internal fusion is in good condition. However,due to the short test rails,the rails deformed severely during welding,and certain anti-deformation measures have been taken. This method has great application prospect and should be further studied and popularized.