Accurate and timely photovoltaic (PV) power forecasting is crucial for the stable operation of power systems. To address the issue of sparse PV power data on rainy days, this paper proposes the use of Wasserstein Generative Adversarial Networks with Gradient Penalty (WGAN-GP) to augment rainy-day data. A progressive gradient penalty strategy is introduced to avoid gradient vanishing. A Bidirectional Long Short-Term Memory network is employed for power forecasting, with adaptive hyperparameter optimization achieved through an improved Sparrow Search Algorithm (LSSA). The optimization capability is enhanced using a chaotic mapping strategy. Validation on data from a 1 MW PV plant demonstrates that the LSSA-optimized model achieves the best forecasting results. After augmenting the rainy-day dataset, the Mean Absolute Error and Root Mean Square Error decreased by 15.3 % and 6.15 %, respectively, indicating that WGAN-GP significantly improves forecasting accuracy on rainy days.