Wind direction time series exhibit angular periodic discontinuity, multi-scale non-stationary fluctuations and abrupt wind shifts, which hinder the precision of short-term forecasting for wind turbine yaw control. In this paper, a dual-branch forecasting framework based on Variational Mode Decomposition (VMD) and Transformer is developed to address the above drawbacks, with a hysteresis gating and zoning residual compensation module embedded for targeted error correction. First, sine–cosine encoding is adopted to eliminate the numerical discontinuity between 0° and 360° for wind direction angular data, and valid meteorological input features are screened to discard redundant covariates. Second, the sine–cosine-encoded wind direction sequence is decomposed into multiple band-limited intrinsic mode functions (IMFs) via VMD, extracting frequency-specific features that reduce non-stationarity and facilitate subsequent Transformer modeling. The standard Transformer encoder serves as the normal branch to capture long-range temporal dependencies across the whole time series, while a lightweight multilayer perceptron (MLP) constitutes the compensation branch to learn prediction deviations between baseline predictions and ground-truth values. The hysteresis gating unit activates residual compensation based on historical prediction errors and angular variation, without requiring access to the current ground-truth value, and compensation intensity is adaptively adjusted via the zoning strategy; relevant coefficients are optimized by random search. Verified on a real wind farm dataset consisting of 10,421 15 min sampling points, the proposed model achieves the lowest MAE of 9.64° among six benchmark models. For the improved genuine mutation samples (angle change > 70°), the model achieves a mean improvement of 6.02°. Ablation experiments verify that VMD preprocessing, the MLP compensation branch, and the hysteresis gating mechanism play indispensable roles in forecasting performance. The proposed framework can support accurate yaw control of wind turbines, and the decomposition–compensation workflow can also be generalized to other periodic non-stationary forecasting tasks.