Photovoltaic (PV) output is susceptible to meteorological factors, resulting in intermittency and randomness of power generation. Accurate prediction of PV power output can not only reduce the impact of PV power generation on the grid but also provide a reference for grid dispatching. Therefore, this paper proposes an LSTM-attention-embedding model based on Bayesian optimization to predict the day-ahead PV power output. The statistical features at multiple time scales, combined features, time features and wind speed categorical features are explored for PV related meteorological factors. A deep learning model is constructed based on an LSTM block and an embedding block with the connection of a merge layer. The LSTM block is used to memorize and attend the historical information, and the embedding block is used to encode the categorical features. Then, an output block is used to output the prediction results, and a residual connection is also included in the model to mitigate the gradient transfer. Bayesian optimization is used to select the optimal combined features. The effectiveness of the proposed model is verified on two actual PV power plants in one area of China. The comparative experimental results show that the performance of the proposed model has been significantly improved compared to LSTM neural networks, BPNN, SVR model and persistence model. INDEX TERMS LSTM-attention-embedding model, features extraction, deep learning, Bayesian optimization, residual connection.