Current assessments for generalized anxiety disorder (GAD) are often subjective and do not rely on a standardized measure to evaluate the GAD across its severity levels. The lack of objective and multi-level quantitative diagnostic criteria poses as a significant challenge for individualized treatment strategies. To address this need, this study aims to establish a GAD grading and quantification diagnostic model by integrating an electroencephalogram (EEG) and ensemble learning. In this context, a total of 39 normal subjects and 80 GAD patients were recruited and divided into four groups: normal control, mild GAD, moderate GAD, and severe GAD. Ten minutes resting state EEG data were collected for every subject. Functional connectivity features were extracted from each EEG segment with different time windows. Then, ensemble learning was employed for GAD classification studies and brain mechanism analysis. Hence, the results showed that the Catboost model with a 10 s time window achieved an impressive 98.1% accuracy for four-level classification. Particularly, it was found that those functional connections situated between the frontal and temporal lobes were significantly more abundant than in other regions, with the beta rhythm being the most prominent. The analysis framework and findings of this study provide substantial evidence for the applications of artificial intelligence in the clinical diagnosis of GAD.