Gastrodia elata is an obligate fungal symbiont used in traditional Chinese medicine. There are currently 4 grades of the plant based on the “Commodity Specification Standard of 76 Kinds of Medicinal Materials”. The traditional discrimination methods for determining the medicinal grade of G. elata powders are complex and time-consuming which are not suitable for rapid analysis. We developed a rapid analysis method for this plant using attenuated total reflection and Fourier-transform infrared spectroscopy (ATR-FTIR) together with machine learning algorithms. The original spectroscopic data was first pre-treated using the multiplicative scatter correction (MSC) method and 4 principal components were extracted using extremely randomized trees (Extra-trees) and principal component analysis (PCA) algorithms, and different kinds of classification models were established. We found that multilayer perceptron classifier (MLPC) modeling was superior to support vector machine (SVM) and resulted in validation and prediction accuracies of 99.17% and 100%, respectively and a modeling time of 2.48 s. The methods established from the current study can rapidly and effectively distinguish the 4 different types of G. elata powders and thus provides a platform for rapid quality inspection.