To address the limited adaptability of fixed-parameter PID controllers under dynamically varying reference signals and the strong dependence of data-driven PID methods on training-data quality, this paper proposes a GRU-based online PID gain-scheduling framework supported by high-quality dataset construction. Diverse reference excitations are first designed, and sequential quadratic programming (SQP) is used as an expert label generator to produce trajectory-level PID gain labels. A region-of-interest (ROI)-based dynamic sample selection strategy is then introduced to retain informative transient samples and reduce the dominance of redundant steady-state data. The gated recurrent unit (GRU) network learns a temporal mapping from error-state sequences to PID gains and is deployed online with closed-loop safeguards, including filtered derivative information, gain denormalization, smoothing, and actuator constraints. In a representative nominal neural-controller benchmark, GRU-PID achieves a rise time of 0.59 s, a settling time of 0.97 s, ISE = 2.10, ITAE = 39.35, and TV = 394.48, showing a favourable balance between tracking accuracy and control-signal smoothness. Five-seed tests further indicate that GRU-PID provides stable nominal performance comparable to competitive neural schedulers, while simulation-based robustness evaluations suggest lower tracking errors than the tested neural baselines under measurement noise, step disturbance, actuator saturation, and combined uncertainty scenarios within the considered benchmark setting.