Adhering to a healthy diet plays an essential role in preventing many nutrition-related diseases, such as obesity, diabetes, high blood pressure, and other cardiovascular diseases. This study aimed to predict adherence to the prescribed diets using a hybrid model of artificial neural networks (ANNs) and the genetic algorithm (GA). In this study, 26 factors affecting diet adherence were modeled using ANN and GA(ANGA). A dataset of 1528 patients, including 1116 females and 412 males, referred to a private clinic was applied. SPSS Ver.25 and MATLAB toolbox 2017 were employed to make the model and analyze the data. The results showed that the accuracy of the proposed ANN and ANGA models for predicting diet adherence was 93.22% and 93.51%, respectively. Also, the Pearson coefficient showed a significant relationship among the factors. The developed model showed the proper performance for predicting adherence to the diet. Moreover, the most effective factors were selected using GA. Some important factors that affect diet adherence include the duration of the marriage, the reason for referring to the clinic, weight, body mass index (BMI), weight satisfaction, lunch and dinner times, and sleep time. Therefore, applying the proposed model can help dietitians identify people who need more support to adhere to the diet.