I think it may be a bit of both. A large part of the negative sentiment towards muggleborns seems to come from the purebloods viewing them as interlopers into a superior culture that has no place for them, for which the nouveau riche are the perfect analogy. But at the same time, the conflict has a great deal to do with ancestry and heredity; Voldemort and his coterie, evil bigots that they are, want to stop the muggleborn outsiders from diluting their superior bloodlines, a clear echo of various racist ideologies. The tie is made even more explicit by Rowling's depiction of Grindelwald, Voldemort's predecessor as a Dark Lord and pureblood supremacist, who has a biography that carefully echoes Adolf Hitler's. Rowling is sometimes unsubtle.
(Disclaimer: I've read an embarrassing amount of fanfiction, and have sometimes been known to confuse canon and fanon.)
Ancestry and heredity are a big part of class in Britain (and some other cultures with a strong class or caste element) but are not about race.
Update: Please post new comments in the latest HPMOR discussion thread, now in the discussion section, since this thread and its first few successors have grown unwieldy (direct links: two, three, four, five, six, seven).
As many of you already know, Eliezer Yudkowsky is writing a Harry Potter fanfic, Harry Potter and the Methods of Rationality, starring a rationalist Harry Potter with ambitions to transform the world by bringing the rationalist/scientific method to magic. But of course a more powerful Potter requires a more challenging wizarding world, and ... well, you can see for yourself how that plays out.
This thread is for discussion of anything related to the story, including insights, confusions, questions, speculation, jokes, discussion of rationality issues raised in the story, attempts at fanfic spinoffs, comments about related fanfictions, and meta-discussion about the fact that Eliezer Yudkowsky is writing Harry Potter fan-fiction (presumably as a means of raising the sanity waterline).
I'm making this a top-level post to create a centralized location for that discussion, since I'm guessing people have things to say (I know I do) and there isn't a great place to put them. fanfiction.net has a different set of users (plus no threading or karma), the main discussion here has been in an old open thread which has petered out and is already near the unwieldy size that would call for a top-level post, and we've had discussions come up in a few other places. So let's have that discussion here.
Comments here will obviously be full of spoilers, and I don't think it makes sense to rot13 the whole thread, so consider this a spoiler warning: this thread contains unrot13'd spoilers for Harry Potter and the Methods of Rationality up to the current chapter and for the original Harry Potter series. Please continue to use rot13 for spoilers to other works of fiction, or if you have insider knowledge of future chapters of Harry Potter and the Methods of Rationality.
A suggestion: mention at the top of your comment which chapter you're commenting on, or what chapter you're up to, so that people can understand the context of your comment even after more chapters have been posted. This can also help people avoid reading spoilers for a new chapter before they realize that there is a new chapter.