The American Heritage Dictionary defines a metaphor as:
“A figure of speech in which a word or phrase that ordinarily designates one thing is used to designate another, thus making an implicit comparison”
They give as an example Shakespeare’s “all the world’s a stage.” Clearly all the world is not a stage but Shakespeare had the line delivered from a stage and compared the people of the world to actors playing their parts.
It was more than a century before Shakespeare that the word metaphor came into English and it did so in a most appropriate document. The year was 1477 and the document something called The Ordinall of Alchimy by one Thomas Norton. This is actually a kind of poem about the secrets of alchemy and the reason that the subject of alchemy is so appropriate for the word metaphor is that writings on alchemy written by alchemists had always been as obscure as possible and used piles of metaphor in favour of straightforward explanations on how to turn lead into gold. The author himself tells us that it is traditional for alchemists to not explain themselves except to one deserving pupil who they train up. That, in fact, it was forbidden among the secret sect of alchemy to write down the formulas and spells required for their art. To this end all descriptions are made by actually describing something else, or describing the opposite and then contradicting oneself. The point being to be as confusing as possible to those who don’t understand alchemy, while leaving sufficient clues for those who do.
In any case, the etymology if metaphor is a great one. It comes to English from the French of the Norman Conquest and of course from Latin before that. But originally the word came from ancient Greek where it literally meant “between bear” or less strictly “carry across.” So it is the idea that an analogy can carry a concept across from one scenario to another. But the best part is that in Greek it still means “carry across” or “transfer” and Greek moving vans are labelled metaphor.