The literal meaning of the word is a plume, such as is worn on a hat or a helmet, but the reference is to King Henri IV of France. Pleasure-loving and cynical, but a brave military leader, who is the best-loved of the kings of France, he was famed for wearing a striking white plume in his helmet, and for his war-cry "Follow my white plume!" (Fr. "Ralliez-vous à mon panache blanc").
The epitome of panache and the reason for its establishment as a virtue, is Rostand's depiction of Cyrano de Bergerac, in his play of that name. (Prior to Rostand, panache was not necessarily a good thing, and was seen by some as a suspect quality).
Panache is referred to explicitly at two points in the play, but is implicit throughout: For example, Cyrano's challenges to Montfleury, Valvert, and at one point, the whole audience, at the theatre (Act I) and his nonchalant surrender of a month's salary to pay for the damages; his duel with a hundred footpads at the Porte de Nesle,(Act II) and his dismissal of the exploit when talking to Roxanne ("I've been much braver since then"); his crossing the Spanish lines daily to deliver Roxanne's letters (Act IV); and his leaving his death-bed in order to keep his appointment with her in Act V.
The explicit references bring in the double meaning: First, in Act IV, when sparring with De Guiche over the loss of his (de Guiche's) white sash; " I hardly think King Henry would have doffed his white panache in any danger" : and finally, Cyrano's last words " ... yet there is something still that will always be mine, and when I go to God's presence, there I'll doff it and sweep the heavenly pavement with a gesture — something I'll take unstained out of this world ... my panache ".
Panache is now used to describe someone who has a dashing confidence of style, or shows a certain flamboyance and courage, and is a familiar word now in English. Its meaning has also been extended to include anything capable of displaying such attributes — for example, various food dishes.