The time-sensitive networking (TSN) is one of the critical technologies for the future development of the industrial Internet of Things (IIoT). This is because TSN can ensure the delay and reliability of network transmission. On the other hand, TSN has also introduced the IEEE 802.1 Qbv. Since the scheduling of IEEE 802.1 Qbv is based on time control gates, the time synchronization (TAS) function can also allow TSN to communicate with fifth-generation wireless communication (5G) to support IEEE 802.1 Qbv. Because IEEE 802.1 Qbv will affect delay and jitter, it is one of the issues that urgently needs to be solved. Considering the problem of time synchronization, this paper focuses on the issue of queue gate control and proposes reinforcement learning (RL) to help us. Since reinforcement learning does not require over-examining the characteristics of past data but depends on environmental changes, adjustment will be more convenient. In addition, this paper also carefully explores the queuing status and defines in detail the problem to be solved. Finally, the experimental results show that the proposed gate control using RL is more efficient than other comparison methods.