I've heard of the "Philosepher's Stone" and Alchemy in Medieval times. Fascinating!
That's where it came from! Rowling researches her books very well. Nicholas Flamel really was a historical alchemist. Those guys were a little loopy, but eventually alchemy became chemistry.
Ironically, it's through physics that one could turn lead into gold... the costs would be prohibitive, of course, since it involves changing the atomic weights...