With the rapid development of the economy, the traditional public transport has not been able to meet the needs of most cities in our country. Urban rail transit emerges as the times require. It develops rapidly with the characteristics of large traffic volume, fast speed, punctuality, safety and comfort of passengers. It has made great contributions to alleviate traffic congestion and solve the problems of inconvenient travel of residents. Passenger flow forecast provides data support for the construction and operation of urban rail transit. Therefore, this paper will take the passenger flow of the Hangzhou Metro Line 2 as an example, and use the grey prediction model to predict the passenger flow in the next month. The results show that the grey model can accurately predict the subway passenger flow