Old English panne, earlier ponne (Mercian) "pan," from West Germanic *panna "pan" (cf. Old Norse panna, Old Frisian panne, Middle Dutch panne, Dutch pan, Old Low German panna, Old High German phanna, German pfanne), probably an early borrowing (4c. or 5c.) from Vulgar Latin *patna, from Latin patina "shallow pan, dish, stewpan," from Greek patane "plate, dish," from PIE *pet-ano-, from root *pete- "to spread" (see pace (n.)). Irish panna probably is from English, and Lithuanian pana is from German.
Used of pan-shaped parts of mechanical apparatus from c.1590; hence flash in the pan, a figurative use from early firearms, where a pan held the priming (and the gunpowder might "flash," but no shot ensue). To go out of the (frying) pan into the fire is first found in Spenser (1596).