late 14c., in alchemy, "main ingredient of the philosopher's stone," from Medieval Latin magnesia, from Greek (he) Magnesia (lithos) "the lodestone," literally "(the) Magnesian (stone)," from Magnesia, region in Thessaly, which is said to be named for the native people name Magnetes, which is of unknown origin. The ancient word, in this sense, has evolved into magnet. But in ancient times the same word, magnes, was used of lodestone as well as of a mineral commonly used in bleaching glass (modern pyrolusite, or manganese dioxide).
In Middle Ages there was some attempt to distinguish lodestone as magnes (masc.) and pyrolusite as magnesia (fem.). Meanwhile, in 18c., a white powder (magnesium carbonate) used as a cosmetic and toothpaste was sold in Rome as magnesia alba ("white magnesia"). It was from this, in 1808, that Davy isolated magnesium. He wanted to call it magnium, to stay as far as possible from the confused word magnesia, but the name was adopted in the form magnesium. Meanwhile from 16c. the other name of pyrolusite had been corrupted to manganese, and when, in 1774, a new element was isolated from it, it came to be called manganese.
Magnesia in its main modern sense of "magnesium oxide" (1755) is perhaps an independent formation from Latin magnes carneus "flesh-magnet" (c. 1550), so called because it adheres strongly to the lips.