Alchemy within the context of this book is a metaphor for one's transformation as a human being, a kind of transcendence from a "base" metal, the ordinary human person, to an elevated form, in alchemy, gold, but metaphorically, for self-actualization, which is the state of being one's own best self, using one's passion, talents, and experiences to their maximum. Self-actualization is what the alchemist is trying to help the young boy achieve. As a metaphor this works on another level as well, since there is a certain amount of serendipity involved in science (which alchemy was considered once upon a time), and there is a certain amount of serendipity involved in self-actualization, too.
An alchemist was a person who tried to turn something worth very little (lead, etc.) into something precious (like gold). During the Middle Ages and into the Renaissance, many serious scientists dabbled in this pursuit. Looking back now, alchemy is not viewed as a 'serious' scientific pursuit (as it's acknowledged now as being impossible), and there's a connotation to the word alchemy that it means a certain kind of dreamer, someone who is stubbornly trying to change nothing into something precious, via a magical process. Paulo Coehlo's books are very symbolic, and your question hints at the understanding that alchemy (a mysterious/miraculous/magical process where the worthless gains worth) has been symbolically applied in the main character's transformation. And, it was---against expectations---successful.
Hope this helps.
An alchemist is someone who practices "alchemy" which is the
speculative philosophy aiming to achieve the transmutation of the base metals into gold
One of my favorite works of literature is Paul Coehlo's The Alchemist, a magical tale of a boy who must place his trust in this spiritual and mysterious man, the alchemist, who will help him with his personal journey and search.
Not knowing your specific quotation, I'm unable to analyze the use of the word in context. However, think of it as an alchemist has a special power to change something ordinary into something unique and special.
Alchemist is symbol of Islamic heritage - culture, science, philosophy and general wisdom - scraped under the rag by Spaniards and Portuguese, ever since the Inquisition.
An alchemist is a person trying to change base metals into gold or silver. In different cultures, the meaning is expanded to someone using elements found in nature to create medicine or a "cure-all elixir". It can also be a spiritual discipline where the goal is to change lead into gold, take it internally, and thereby, achieving immortality.