The principle and characteristic of Stray Current (SC) resulting from rail transit system were introduced. Measurement methods and corrosion evaluation of SC were also discussed. For an underground gas pipeline located in the neighboring area and parallel to the rail transit in Shanghai, a virtual instrument-based SC monitoring system was developed to measure pipe-to-soil potential, current within pipeline. Results obtained from Fourier transformation reveal that pipe-to-soil potential fluctuation of the tested gas pipeline is 200mV and the current is 150 mA, which is closely related to operation of subway. Serious corrosion of the buried gas pipeline might happen.