Nuanced H.P.'s "racism" a bit - from what I can tell he was an actual xenophobe with a distinct fear of "corruption in the blood", and whilst he was probably roughly as racially conscious as normal for the 1920s (when racial determinism and separatism were still big and respectable), his main fear seems to be of miscegenation and corruption. Obviously it's still unpleasant by modern standards but it does make some of the shock-revelations in his work more understandable (and powerful) than they are for someone who just sees "he saw a fish man and went mad. Oh and the author was racist" which I see a lot of on teh interwebz. See, for example, the last Delapore from The Rats in the Walls - granted you'd never call a cat that these days, but the real horror is about the protagonist looking at the evil of his ancestors and assuming that it necessarily condemns him. It's the same reason Arthur Jermyn goes mad, whilst other protagonists go the other way and embrace "the monster that they must become".
In some ways, it is, actually, a racial determinist viewpoint, but not the way such things are usually depicted. A modern take might be more about overcoming what your ancestors were and determining your own destiny - although maybe things have moved on again from there.
Here's a few direct citations from his own work that are pretty hard to argue as being anything other than horribly racist:
See Lovecraft's poem "On The Creation Of *N-WORD*" from 1912. As you can imagine, he did not use the euphemism "N-Word" in his poem, he used the actual offensive word, spelled it out and even made it the rhyme at the end of a line. In fact, the entire point of all eight lines of the poem are to insult and slander an entire race, and say they are less than human. Lovecraft was terribly racist. Full stop. Not just "a product of his time", but full-on repugnant, and it runs as a theme in all his work.
Or see Lovecraft's story "Polaris" from 1920. All through the tale it talks about horrible demons, and then reveals that the horrible demons are an existing race and culture of humans. Not as in "some some members of this race are possessed by monsters" or even "some members of this race are monsters", but literally "by the way the horrible demons I was talking about, today we know them by a different name, and that different name is the same as an existing ethno-cultural group because they are all monsters." It's some seriously messed-up bigotry, with no attempt to hide it.
…"nice". Wierdly I'd never heard of either of those pieces which, you are correct, give a very different impression. Also qualifies what you meant by surprise racist bits. Strange how what appears to be quite a complex situation can coincide with someone being a pretty straightforwrd dick.
I'm now getting one of those "death of the author" things - similar to the possibly legendary moment where a professor of English argued over the meaning of a passage with its author.
"*long involved psychoanalysis of H.P's work*"
"No, actually I just hate n***…"