Predicting movie box office has received extensive attention from academia and industry. At present, the main method of forecasting movie box office is subjective prediction, which is not widely accepted due to its accuracy and applicability. This study improves the fruit fly algorithm to optimize the generalized regression neural network (IFOA-GRNN) model to predict whether a movie can become a high-grossing movie. By using the actual box office data and performing virtual simulation calculations, the root means square error of the IFOA-GRNN model predicting the movie box office is 0.3412, and the classification accuracy is about 90%. By comparing this model with FOA-GRNN, KNN, GRNN, Random Forest, Naive Bayes, Ensembles for Boosting, Discriminant Analysis Classifier, and SVM, it is found that the prediction effect of the IFOA-GRNN model is significantly better than the above eight models. The contribution of this article is to propose a generalized regression neural network model based on an improved fruit fly optimization algorithm, which can greatly improve the accuracy of movie box office prediction.