"broad, shallow vessel of metal used for domestic purposes," Middle English panne, from Old English panne, earlier ponne (Mercian) "pan," from Proto-Germanic *panno "pan" (source also of 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. This is supposed to be from Latin patina "shallow pan, dish, stew-pan," from Greek patane "plate, dish," from PIE *pet-ano-, from root *pete- "to spread."
But both the Latin and Germanic words might be from a substrate language [Boutkan]. Irish panna probably is from English, and Lithuanian panė is from German.
The word has been used of any hollow thing shaped somewhat like a pan; the sense of "head, top of the head" is by c. 1300. It was used of pan-shaped parts of mechanical apparatus from c. 1590; hence flash in the pan (see flash (n.1)), 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 "escape one evil only to fall into a worse" is in Spenser (1596).