IQ is correlated to wealth and IQ is hereditary, so it follows that children from wealthy parents would, on average, have higher IQ than their classmates.
When you read about those gaps, you might assume that they mostly have to do with ability. Rich kids do better on the SAT, so of course they do better in college. But ability turns out to be a relatively minor factor behind this divide. If you compare college students with the same standardized-test scores who come from different family backgrounds, you find that their educational outcomes reflect their parents’ income, not their test scores.