Since the early 2000 s, average standardized test scores of Brazilian public primary and middle school students in both reading and mathematics on the national test, the SAEB, have risen substantially. Although the increases cut across all race and socioeconomic groups, the increases were unequal across groups and varied greatly across states and municipalities/school districts. In this paper, we describe student achievement gains in Brazil among municipalities in 2007–2017, with the goal of understanding the variation in these gains and the socioeconomic, race, and school resource correlates of that variation. Our results suggest that student social class and race were highly correlated with municipal test score gains: those municipalities with higher social class and proportionately more White students made significantly larger gains. However, municipalities with greater social class inequality made smaller gains. Certain average characteristics of teachers in a municipality and the incidence of school violence were also significantly related to student performance gains. Thus, our estimates suggest that it may be possible to soften the effects of social structural inequality among and within districts by increasing the quality of teacher resources and reducing school violence in lower academically gaining districts.