The author used the actual data obtained from the prevention and control of COVID-19 in China and the cumulative number of confirmed cases obtained at different time intervals to predict the medium and long term (20 days, 40 days and 60 days) future epidemic trend by grey modeling. Research objectives: Grey modeling theory is applied to the modeling and prediction of infectious diseases, appropriate data obtained from the prevention and control of infectious diseases are selected for the simulation and prediction of the medium and long term future epidemic trend of infectious diseases, and an effective method for the prediction of the future epidemic trend of infectious diseases is sought. Research Methods: The author used the actual data obtained from the prevention and control of COVID-19 in China. The trend curve was drawn by statistical data, the trend of epidemic was visually analyzed and observed, and the best series for grey modeling prediction was determined. Then GM(1,1) grey modeling was carried out on the selected series, and the error and accuracy of the built model were tested. Finally, the predicted value of the model was actually verified. Research results: According to the series graph, we selected the cumulative number of confirmed cases with time intervals of 20 days, 40 days and 60 days to model and forecast the future medium and long term epidemic trend of COVID-19 in China, and built the prediction models of cumulative confirmed cases respectively. The average error of the GM(1,1) prediction model established by the cumulative number of confirmed cases at the time node with a time interval of 40 days is too high, reaching 0.6422, and the simulation accuracy is only 37%. It has no practical significance for forecasting. The prediction model of GM(1,1), established by the cumulative number of confirmed cases with a time interval of 20 days, has a large average simulation error of 0.3336 and a simulation accuracy of 67%. Through practical verification, the prediction accuracy of GM(1,1) can reach 99.54%, which has a certain practical value for prediction. The prediction model of GM (1,1) based on the cumulative number of confirmed cases at time nodes with a time interval of 60 days, the average simulation error of GM (1,1) prediction model was 0.01167, and the simulation accuracy was 98.83%. Multiple parameters in the accuracy analysis reached the index of the first-level model. The actual verification of the model showed that the cumulative number of confirmed cases at the predicted time node was 102271. In practice, 107094 cases were recorded, and the predicted number was 4823 cases less than the actual number. The relative error was 0.045, and the prediction accuracy reached 95.49%. Satisfactory gray modeling prediction effect was obtained.