Photovoltaic (PV) output power inherently exhibits an intermittent property depending on the variation of weather conditions. Since PV power producers may be charged to large penalties in forthcoming energy markets due to the uncertainty of PV power generation, they need a more accurate PV power prediction scheme in energy market operation. In this paper, we characterize the effect of PV power prediction errors on energy storage system (ESS)-based PV power trading in energy markets. First, we analyze the prediction accuracy of two machine learning (ML) schemes for the PV output power and estimate their error distributions. We propose an efficient ESS management scheme for charging and discharging operation of ESS in order to reduce the deviations between the day-ahead (DA) and real-time (RT) dispatch in energy markets. In addition, we estimate the capacity of ESSs, which can absorb the prediction errors and then compare the PV power producer's profit according to ML-based prediction schemes with/without ESS. In case of ML-based prediction schemes with ESS, the ANN and SVM schemes yield a decrease in the deviation penalty by up to 87% and 74%, respectively, compared with the profit of those schemes without ESS.