Existing traffic flow forecasting technologies achieve great success based on deep learning models on a large number of datasets gathered by organizations. However, there are two critical challenges. One is that data exists in the form of “isolated islands”. The other is the data privacy and security issue, which is becoming more significant than ever before. In this paper,we propose a Federated Learning-based Gated Recurrent Unit neural network framework (FedGRU) for traffic flow prediction(TFP) to address these challenges. Specifically, FedGRU model differs from current centralized learning methods and updates a universe learning model through a secure aggregation parameter mechanism rather than sharing data among organizations. In the secure parameter aggregation mechanism, we introduce aFederated Averaging algorithm to control the communication overhead during parameter transmission. Through extensive case studies on the Performance Measurement System (PeMS) dataset,it is shown that FedGRU model can achieve accurate and timely traffic prediction without compromising privacy.