Let's get something straight. The alchemists, as a whole, were not stupid. They were not crazy, they were not ignorant, and they were not charlatans (for the most part). Alchemists, in their day, were at the forefront of science and technology, and they essentially invented the scientific method during their unorthodox experiments. This was, however, nothing more than a side effect of their true research, which was something altogether more ambitious and subtle...
Producing gold from lead (just ignore how it would make gold worthless) was considered possible by the ancient alchemists , but this was only a parlor trick. The panacea could cure any disease and extend life. But what alchemists worldwide were truly looking for was a formula that would grant life eternal. In Dar-al-Islam, it was known as the elixir. Indian alchemists sought it as soma ras. In Christendom, it was called the philosopher's stone. This was the Great Work.  Some of the alchemists were even rumored to have succeeded -- there are occultists who will inform you that le Count de Saint Germain, born in the 18th century, still walks the streets among us. The same is said for the alchemist Nicolas Flamel and his wife who lived in Paris in the 15th century.
Alchemists had a vast cosmological worldview that shares more in common with the ancient pagan pantheon than it does with either monotheism or modern science. They believed, as did Aristotle, that the world was composed of a handful of elements that generated the world by moving according to their own natures, animated by the great Source from which all life sprung. Western alchemists generally divided the elements into fire, water, wind, earth, and quintessence (star-matter). Eastern alchemists had a different worldview, and saw fire, water, earth, wood, and metal. Due to the repression of alternative religious philosophy in Europe, many alchemical books are intentionally difficult to read and understand.
Alchemy in its day also inspired a great deal of artistic media. Textbooks, ikons, painted plates, and paintings; alchemical symbols gained an even wider audience few of whom understood what they were seeing. Many alchemical texts take the form of myths and allegories, and the authors could sneak more occult truths behind the apparently harmless fiction. When alchemy as a science was supplanted by modern chemistry, alchemy as a philosophical, spiritual, and psychological journey continued to inspire artists and writers, most notably the surrealists.
The more comprehensible stuff:
- The Emerald Tablet
- Chymical Wedding of Christian Rosenkreutz
- The Book of Lambspring
In the modern period, the language of alchemy texts has become less based in chemistry metaphor. While these might not be "alchemical" texts in the strictest definition, they convey a great deal of the same worldview.
- The Kybalion
- Psychology and Alchemy, Alchemical Studies, Mysterium Coniunctionis, et al. by Carl Jung
In real life the publishing of "The Sceptical Chymist" by Robert Boyle in 1661 is considered the point in which Alchemy and Chemistry split off as a Mysticism and a Science respectively. However, the twentieth century brought with it the advent of nuclear engineering, which is widely regarded as a restoration of alchemy as a science, forsaking the associations with mysticism. Irene and Frederick Joulet-Curie were awarded the Nobel Prize for discovering the first artificial transmutation of one element into another.
See Alchemy Is Magic for its fantastical treatment in fiction.
- and indeed, it has at last been done with particle accelerators, although the process costs more money than the gold you get will pay for
- One notes that they considered the transmutation of gold and the achievement of immortality to be connected. Because gold does not tarnish, rust, corrode, etc., it is immortal.