Homestead food production (HFP) programmes improve the availability of vegetables by providing training in growing nutrient-dense crops. In rural Tanzania, most foods consumed are carbohydrate-rich staples with low micronutrient concentrations. This cluster-randomized controlled trial investigated whether women growing home gardens have higher dietary diversity, household food security or probability of consuming nutrient-rich food groups than women in a control group. We enrolled 1,006 women of reproductive age in 10 villages in Pwani Region in eastern Tanzania, split between intervention (INT) and control (CON) groups. INT received (a) agricultural training and inputs to promote HFP and dietary diversity and (b) nutrition and public health counselling from agricultural extension workers and community health workers. CON received standard services provided by agriculture and health workers. Results were analysed using linear regression models with propensity weighting adjusting for individual-level confounders and differential loss to follow up. Women in INT consumed 0.50 (95% CI [0.20, 0.80], p = 0.001) more food groups per day than women in CON. Women in INT were also 14 percentage points (95% CI [6, 22], p = 0.001) more likely to consume at least five food groups per day, and INT households were 6 percentage points (95% CI [−13, 0], p = 0.059) less likely to experience moderate-to-severe food insecurity compared with CON. This home gardening intervention had positive effects on diet quality and food security after 1 year. Future