This study presents a parameter estimation method that uses an enhanced gray wolf optimizer (EGWO) to optimize the parameters for a two-diode photovoltaic (PV) power generation system. The proposed method consists of three stages. The first stage converts seven parameters for the two-diode model into 17 parameters for different environmental conditions, which provides more precise parameter estimation for the PV model. A PV power generation model is then established to represent the nonlinear relationship between inputs and outputs. The second stage involves a parameter sensitivity analysis and uses the overall effect method to remove the parameters that have smaller effect on the output. The final stage uses an enhanced GWO that is associated with measurement data to optimally estimate the parameters that are selected in the second stage. When the parameters are estimated, the predicted value for the PV power output is calculated for specific values of solar irradiation and module temperature. The proposed method is verified on a 200 kWp PV power generation system. To confirm the feasibility of the proposed method, the parameter estimation before and after optimization are compared, and these results are compared with other optimization algorithms, as well as those for a single-diode PV model.