Anti-black bias is an important focal point in conversations about the sources of racial inequality in schools. Much of the empirical research on this issue has focused on the racial biases of individual teachers, finding that racial inequality in student outcomes is generally worse when teachers have more racial bias. Less is known, however, about how racial inequality in schools relates to anti-black biases that play out at a larger scale within communities. This study begins to fill this gap by examining the relationship between county-level estimates of racial bias and black-white test score gaps in U.S. schools. Data from over 1 million respondents from across the United States who completed an online survey of explicit and implicit racial attitudes were combined with data from the Education Opportunity Project covering over 300 million test scores from U.S. schoolchildren in grades 3 through 8. Results indicated that counties with higher levels of racial bias had larger black-white test score disparities. The magnitude of these associations was on par with other widely accepted predictors of racial test score gaps, including racial gaps in family income and racial gaps in single parenthood. This study also found that the observed relation between collective rates of racial bias and racial test score gaps was largely accounted for when controlling for between-school segregation and racial gaps in discipline, gifted assignment, and special education placement. This pattern is consistent with a theoretical model in which collective rates of racial bias relate to educational opportunity through sorting mechanisms that operate both within and beyond schools.