ABSTRACT Accurate prediction of the structural temperature field is required for the performance assessment of engineering structures and for maintaining structural safety. However, there are complex time-lag effects between ambient temperature and structural temperature. It is difficult to accurately describe and predict the structural temperature using traditional linear and nonlinear fitting methods. Hence, this study uses the advantages of gated recurrent unit (GRU) neural networks in dealing with complex nonlinear mapping issues, further considering solar radiation and developing a structural temperature prediction framework using ambient temperature and the deep learning model. The framework is applied in structural temperature prediction for an ancient city wall in China. The solar altitude angle at the location of the city wall is calculated, and the input and output structures of the deep learning neural network model are optimized. In the long-term prediction of the structural temperature of the city wall, the root mean square error (RMSE) of the GRU model is less than 0.6°C, which solves the problem of low accuracy caused by time-lag effects.