Intelligence is indeed something you're born with and that develops given your maturity level.
Racism, in my view, is just exacerbated immaturity. It's like other similar phenomena "I belong to x group so I MUST hate y group, that should tighten my ties with x group".