Because the deformation of concrete dams has strong nonlinear characteristics, too many parameters are involved when using current prediction models, and yet these models are prone to local optimum. Here, a gated recurrent unit (GRU) model in deep learning was combined with Bayesian optimization (BO) to optimize the hyperparameters of the gated recurrent units, based on which the BO-GRU model was established to predict the deformation of concrete dams. In order to test the feasibility of the model, its prediction result was then compared with that of the extreme learning machine, the correlation vector machine and the support vector machine optimized by the genetic algorithm, based on the measured deformation monitoring data. The comparison result shows that the BO-GRU model has strong generalization ability and high operating efficiency, and it is suitable for the deformation prediction of concrete dams.