Adherence to the traditional Mediterranean diet has been customarily assessed with the Mediterranean diet score (MDS or Trichopolou Index), with values of 0 or 1 assigned to each of the nine elements, and with the use of the sex-specific median as the cutoff. The value of persons whose consumption of the six beneficial items (ratio of monounsaturated to saturated fatty acids, vegetables, legumes, fruits and nuts, cereal, and fish) is at or above the median and is assigned a value of 1. Otherwise they receive 0 points. For detrimental elements (meats and dairy products) persons whose consumption is below the median are assigned a value of 1. An additional ninth point is assigned to moderate ethanol intake. We assessed the effect of each of the nine components of the MDS (replacing the fats ratio with olive oil, the main source of monounsaturated fats in the Mediterranean diet) on the risk of COVID-19 infection, symptomatic and severe COVID-19. From March to December 2020, 9,699 participants of the “Seguimiento Universidad de Navarra” (SUN) cohort answered a COVID-19 questionnaire. After excluding doctors and nurses, 5,194 participants were included in the main statistical analyses. Among them, we observed 382 cases of COVID-19 based on symptoms and clinical diagnosis; 167 of them with test confirmation. For the two COVID-19 definitions used, we found a significant decrease in risk for a higher adherence to the Mediterranean diet (OR = 0.64, 95% CI: 0.42–0.98, p for trend = 0.040; and OR = 0.44, 95% CI: 0.22–0.88, p for trend = 0.020, for test-diagnosed cases). A protective effect was also found for symptomatic COVID-19 (OR = 0.64, 95% CI: 0.41–1.00, p for trend = 0.050). Among the different individual food groups, only the consumption of whole dairy products showed a harmful direct association. The Mediterranean diet as a whole seems more important than each of its components in preventing the infection and symptoms of COVID-19.