This paper proposes a novel method for the real-time prediction of photovoltaic (PV) power output by integrating phase space reconstruction (PSR), improved grey wolf optimization (GWO), and long short-term memory (LSTM) neural networks. The proposed method consists of three main steps. First, historical data are denoised and features are extracted using singular spectrum analysis (SSA) and complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN). Second, improved grey wolf optimization (GWO) is employed to optimize the key parameters of phase space reconstruction (PSR) and long short-term memory (LSTM) neural networks. Third, real-time predictions are made using LSTM neural networks, with dynamic updates of training data and model parameters. Experimental results demonstrate that the proposed method has significant advantages in both prediction accuracy and speed. Specifically, the proposed method achieves a mean absolute percentage error (MAPE) of 3.45%, significantly outperforming traditional machine learning models and other neural network-based approaches. Compared with seven alternative methods, our method improves prediction accuracy by 15% to 25% and computational speed by 20% to 30%. Additionally, the proposed method exhibits excellent prediction stability and adaptability, effectively handling the nonlinear and chaotic characteristics of PV power.