This study proposes a random forest algorithm to evaluate water poverty. It shows how the machine learning technique can be used to classify the degree of water poverty into five levels: very severe, severe, moderate, mild, and very mild. The strengths of the proposed random forest method include a high classification accuracy, good operational efficiency, and the ability to handle high-dimensional datasets. The success of the proposed method is empirically illustrated through a case study in Gansu, Northwest China. The analysis shows that from 2000 to 2017, the severity of water poverty in the study area declined. In 2000, most municipalities were classified as level 1 (very severe) or level 2 (severe). In 2017, level 1 water poverty disappeared, with most municipalities classified in as level 3 (moderate) and level 4 (mild). Spatially, there is a significant difference between the water poverty levels of the western, central, and eastern parts of Gansu, and the eastern part is affected by serious water poverty problems.