I have done studies on racism & you know what? Nothing I read pinpointed a specific origin. I have, however, come across some interesting tidbits:
The Native Americans, (or so-called "Indians") upon meeting the Europeans & seeing their African slaves, came up w/a theory that the gods cooked people before birth. Hence we were overcooked, whites are undercooked & they were, of course, just right. So as you see, this is a case of basic assumption.
The Mormon Church, in its earliest days, taught that when the war between God & Satan ended, those who sided with God were given "perfect" (i.e. white/blond haired/blue eyed) bodies, those who sided w/Satan were given no bodies, & those who remained neutral were "cursed" with black skin & hair.
So this is a case of learned hate. So I think the true origin lies somewhere in-between.