Water is a critical resource globally, covering approximately 71% of the Earth’s surface. Employing analytical models to forecast water quality parameters based on historical data is a key strategy in the field of water quality monitoring and treatment. By using a forecasting model, potential changes in water quality can be understood over time. In this study, the gated recurrent unit (GRU) neural network was utilized to forecast dissolved oxygen levels following variational mode decomposition (VMD). The GRU neural network’s parameters were optimized using the grey wolf optimizer (GWO), leading to the development of a VMD–GWO–GRU model for forecasting water quality parameters. The results indicate that this model outperforms both the standalone GRU model and the GWO–GRU model in capturing key information related to water quality parameters. Additionally, it shows improved accuracy in forecasting medium to long-term water quality changes, resulting in reduced root mean square error (RMSE) and mean absolute percentage error (MAPE). The model demonstrates a significant improvement in the lag of forecasting water quality parameters, ultimately boosting forecasting accuracy. This approach can be applied effectively in both monitoring and forecasting water quality parameters, serving as a solid foundation for future water quality treatment strategies.