In recent years, offshore wind power has grown by leaps and bounds, becoming an important part of clean energy. As a key component of the offshore wind turbine, gearboxes are costly to maintain. With the accumulation of operating time and the commissioning of large and heavy wind turbines, the gearbox failure rate increases. In order to realize the monitoring of wind turbine gearbox condition, a gearbox oil temperature prediction method based on K-means clustering and extreme learning machine (ELM) is proposed in this paper. Based on prior knowledge from field experts, the number of clusters is set to 2, and K-means clustering analysis is performed using univariate (impeller speed) and multivariate (all selected variables), respectively. Finally, the gearbox oil temperature is predicted by combining field supervisory control and data acquisition (SCADA) data and ELM prediction models. The results are analyzed and compared, and the univariate classified ELM model combined with prior knowledge improves the prediction accuracy relative to the unclassified ELM, which verifies the superiority of the proposed method.