Doesn't "quint" mean "five"? What does that have to do with the meaning of "quintessential"?
"Essence" in this context is a synonym for "element", and "essential" for "elemental". In pre-atomic theory, there were four "known" elements or essences — Earth, Air, Fire and Water — and a putative fifth element (quinta essentia). The fifth element was believed to be superior to the others, and so, "quintessential" has come to mean something that is superior.
The origin of the word quint is the late 17th century; it derives from French, which took the word from Latin quintus (fifth) from quinque (five). In Italian, quinto means fifth, and has the same origin.
Quintessential derives from quintessence (from Latin quinta essentia), which was considered thought to fill the Universe beyond Earth. In modern physics, quintessence is a hypothetical form of dark energy.
The NOAD reports that the origin of quintessence is late Middle English (as a term in philosophy), via French from medieval Latin quinta essentia ("fifth essence").
Sorry, I don't agree with the previous answers.
In alchemy, "essence" was the result of the distillation in an alambic (still used for perfumes) ; the process leads to a fairly purified product, but it can't be perfect ; you still have some impurities. Thus, you repeat it again and again. On the fifth time, it was considered that you could not do any better.