Perinatal depression (PD) has negative consequences for mothers and children and is more prevalent among women of low socioeconomic status. Home visitation programs serve low-income pregnant women at risk for PD. This study tested the efficacy of a group-based cognitive behavioral intervention (Mothers and Babies Course; MB) in reducing depressive symptoms and preventing the onset of perinatal depression among low-income women enrolled in home visitation. A randomized controlled trial was conducted. Seventy-eight women who were pregnant or had a child less than 6 months of age and who were assessed as at risk for PD were randomized to the MB intervention or usual home visiting services. Depressive symptoms were assessed at baseline and 1-week, 3- and 6-months post-intervention; depressive episodes were assessed with a clinical interview at the 6-month follow-up. Depressive symptoms declined at a significantly greater rate for intervention participants than usual care participants between baseline and 1-week, 3 and 6 months post-intervention. At the 6-month follow-up, 15 % of women who received the MB intervention had experienced a major depressive episode as compared with 32 % of women receiving usual care. Integrating mental health interventions into home visitation appears to be a promising approach for preventing PD. Cognitive behavioral techniques can be effective in preventing depression in perinatal populations and treating it.