J.K. Rowling drew inspiration from numerous sources when writing Harry Potter, from Homer to Shakespeare. One author in particular heavily influenced the characters, setting, and concept of the book series: T.H. White.
Even if you don't recognize the writer's name immediately, you've likely heard of his most famous story, The Sword in the Stone. As MyLondon reports, without White's take on Merlin and young King Arthur, we may have never gotten Dumbledore and Harry.
Rowling acknowledged the connection between Harry Potter and The Sword in the Stone, calling the boy Arthur (who goes by the name Wart before he becomes king) Harry's "spiritual ancestor." The two characters share many similarities. Like Harry, Wart is predestined for great things, as he proves when he pulls out a magical sword stuck on top of a stone and claims his title as king. But both boys come from humble backgrounds, Harry being an orphan and Wart being a squire of low status. Wart even lives in a castle not unlike Hogwarts.
One of the most obvious elements Rowling borrowed from White is the trope of the wise, white-bearded wizard. Merlin and Albus Dumbledore are both mentors to their story's young protagonists, and they're both powerful wizards with a whimsical nature. They also have pet birds in common, though Merlin owns an owl instead of a phoenix.
T.H. White didn't invent the tale of King Arthur. The author was a fan of the 15th-century telling of the legend, Le Morte D'Arthur, and was inspired to write the characters into a children's story in 1938. The Sword in the Stone kicked off his series The Once and Future King and was adapted into an animated Disney film of the same name in 1963.
Though White didn't come up with King Arthur on his own, he did write the schoolboy version of the character that inspired Harry Potter. Fans of both stories may have noticed a nod to the Arthur legend in Harry Potter and the Philosopher's Stone. In the first book in the series, Harry finds a chocolate frog card of Merlin, confirming that the wizard exists in his world.