The Mediterranean diet (MD) is a dietary pattern effective in terms of prevention of obesity-related diseases, and represents the gold standard in preventive medicine, due to the synergistic action of many nutrients with antioxidant and anti-inflammatory properties. In addition, excess body weight significantly increases the risk of hypovitaminosis D, a well-recognized common feature of individuals with obesity. It is well-known that there is a clear gender difference in the adherence to the MD. The aim of this study was to investigate the association between adherence to the MD and 25-hydroxyvitamin D (25OHD) levels in adults, according to gender. Study population consisted of 617 participants; 296 were males and 321 were females, matched by age and body mass index (BMI). A validated 14-item questionnaire PREDIMED (Prevención con dieta Mediterránea) was used for the assessment of adherence to the MD. The 25OHD levels were determined by a direct competitive chemiluminescence immunoassay. Females have a higher PREDIMED score than males (7.4 ± 2.8 vs. 6.7 ± 3.1 score, p = 0.001), and according to PREDIMED categories, a greater percentage of males had low adherence to the MD compared to their female counterparts (40.2% vs. 37.1%; χ2 = 8.94, p = 0.003). The 25OHD levels were higher in males than in females (18.3 ± 7.3 vs. 16.8 ± 7.8 ng/mL, p = 0.01), and a higher percentage of males had sufficient 25OHD levels (>30 ng/mL) than their female counterparts (10.5% vs. 3.4%, χ2 = 10.96, p < 0.001). Stratifying the sample population according to 25OHD categories, BMI decreased and PREDIMED score increased significantly along with the increased 25OHD levels, in both males and females, respectively (p < 0.001). Looking at the bivariate correlations, PREDIMED score was positively correlated with 25OHD levels after adjusting for age and BMI, in both males (r = 0.21, p < 0.001) and females (r = 0.30, p < 0.001). At the bivariate proportional odds ratio (OR) model, 25OHD levels presented the highest OR values in the category low adherence vs. high adherence to the MD, in both genders (OR 1.21 and OR 1.31, in males and females, respectively). Receiver operator characteristic (ROC) analysis was performed to determine the cut-off values of PREDIMED scores predictive of 25OHD levels: PREDIMED score >5 in males (p < 0.001) and >7 in females (p < 0.001) could serve as thresholds for 25OHD levels above the median. The results of our study highlighted a novel positive association between adherence to the MD and 25OHD levels in both genders. Although 25OHD levels were higher in males than females, 69.7% were deficient. To the best of our knowledge, this is the first study to show that high adherence to the MD is associated with low BMI and high 25OHD levels in both genders, probably through the anti-inflammatory and anti-oxidant effects that are synergistically exerted by either MD or vitamin D on body weight.