Low birth weight is related to morbidity and mortality and sequelae during infant development, thereby impacting health system costs. It is thus important to evaluate factors that influence low birth weight and to estimate their impact on the Brazilian Unified National Health System (SUS). This was a nested prospective study in a cohort of pregnant women who received prenatal care and gave birth in the National Health System in hospitals with ICUs in the city of Pelotas, Rio Grande do Sul State, Brazil. Gestational depression was associated with a fourfold risk of low birth weight (PR = 3.94; CI: 1.49-10.36). Based on the population-attributable fraction, in the overall population an estimated 36.17% of low birth weight infants are born to mothers with an episode of depression during pregnancy, with an estimated cost of more than R$76 million (U$38 million) in Brazil. The study recommends the expansion of preventive and therapeutic mental health care measures for pregnant women and the adequate use of resources in the Unified National Health System to improve neonatal outcomes.