Emily Willingham mentioned on Twitter that the names of the Harry Potter characters Dumbledore and Hagrid come from Thomas Hardy’s 1886 novel The Mayor of Casterbridge. Both appear in this passage:

One grievous failing of Elizabeth’s was her occasional pretty and picturesque use of dialect words … … in time it came to pass that for “fay” she said “succeed”; that she no longer spoke of “dumbledores” but of “humble bees”; no longer said of young men and women that they “walked together,” but that they were “engaged”; that she grew to talk of “greggles” as “wild hyacinths”; that when she had not slept she did not quaintly tell the servants next morning that she had been “hag-rid,” but that she had “suffered from indigestion.”

Apparently dumbledore is a dialect variation on bumblebee and hagrid is a variation on haggard. I don’t know whether this is actually where Rowling drew her character names but it seems plausible.