The classical recurrent neural networks (RNNs) face the defect of long-term dependence in the prediction of time series and thus have a poor generalization ability. In the meantime, their loss functions are generally obtained by means of traversing the whole training data set for supervised learning, which increases the time complexity and space complexity. As a result, classical RNNs usually show poor prediction accuracy and undesirable computation efficiency in the prediction of residual useful life (RUL) of rotating machinery (RM). In view of this, a multi-layer gated temporal convolution network (MLGTCN) is proposed to predict RUL of RM in this paper. In our proposed MLGTCN, a multi-layer temporal convolution network structure is innovatively constructed to perform convolution operations on input data for expanding the receptive field, and the long-term historical information can be traced, which solves the problem of long-term dependence and enhances the generalization ability of MLGTCN. Moreover, the gated linear units (GLUs) are creatively constructed to filter out the important information hierarchically, which endows MLGTCN with a high nonlinear approximation capability. Additionally, in order to improve the global optimization ability and convergence speed, a reinforcement learning algorithm based on semi-gradient temporal difference (semi-gradient TD) is adopted and a novel action controller is designed for updating the convolution kernels and bias values of MLGTCN, which can use the increment information between the successive predicted values, thus rapidly approaching the optimal strategy. Owing to the above MLGTCN’s advantages, high prediction accuracy and desirable computation efficiency can be achieved in the RUL prediction of RM. The effectiveness of our proposed method is experimentally validated with the RUL prediction of double-row roller bearings.