This study examines the relationship between county-level estimates of implicit 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 version of the Race Implicit Association Test (IAT) were combined with data from the Stanford Education Data Archive covering over 300 million test scores from U.S. schoolchildren in grades 3 through 8. Two key findings emerged. First, in both bivariate and multivariate models, counties with higher levels of racial bias had larger black-white test score disparities. The magnitude of these associations were on par with other widely accepted predictors of racial test score gaps, including racial gaps in family income and racial gaps in single parenthood. Second, the observed relationship between collective rates of racial bias and racial test score gaps was explained by the fact that counties with higher rates of racial bias had schools that were characterized by more racial segregation and larger racial gaps in gifted and talented assignment as well as special education placement. This pattern is consistent with a theoretical model in which aggregate rates of racial bias affect educational opportunity through sorting mechanisms that operate both within and beyond schools.