The coronavirus 2019 (COVID-19) pandemic has had a significant impact on the economy and health, especially for the most vulnerable social groups. The social determinants of health are one of the most relevant risks for becoming infected with COVID-19, due to the health consequences for those who are exposed to it. The objective of this study was to analyze the influence of social determinants in health on COVID-19 infection in vulnerable social groups. A transversal epidemiological study was carried out on 746 individuals in vulnerable situations living in conditions of extreme poverty in disadvantaged areas in the province of Almeria (southeast of Spain). Social determinants of health such access to drinking water (p < 0.001) and economic income (p = 0.04) influenced the infection of COVID-19. A binary logistic regression model showed that the significant predictors of COVID-19 infection were the lack of economic income and inaccessible drinking water. The government and social health services must be aware of this problem in order to play an active role in searching for solutions and implementing public health prevention measures to eliminate social inequalities in health.