Vitamin D is a fundamental regulator of host defences by activating genes related to innate and adaptive immunity. Previous research shows a correlation between the levels of vitamin D in patients infected with SARS-CoV-2 and the degree of disease severity. This work investigates the impact of the genetic background related to vitamin D pathways on COVID-19 severity. For the first time, the Portuguese population was characterized regarding the prevalence of high impact variants in genes associated with the vitamin D pathways. This study enrolled 517 patients admitted to two tertiary Portuguese hospitals. The serum concentration of 25 (OH)D, was measured in the hospital at the time of patient admission. Genetic variants, 18 variants, in the genes AMDHD1, CYP2R1, CYP24A1, DHCR7, GC, SEC23A, and VDR were analysed. The results show that polymorphisms in the vitamin D binding protein encoded by the GC gene are related to the infection severity (p = 0.005). There is an association between vitamin D polygenic risk score and the serum concentration of 25 (OH)D (p = 0.04). There is an association between 25 (OH)D levels and the survival and fatal outcomes (p = 1.5e−4). The Portuguese population has a higher prevalence of the DHCR7 RS12785878 variant when compared with its prevalence in the European population (19% versus 10%). This study shows a genetic susceptibility for vitamin D deficiency that might explain higher severity degrees in COVID-19 patients. These results reinforce the relevance of personalized strategies in the context of viral diseases. Trial registration: NCT04370808.