Before bullets were manufactured in their own metal jackets containing the powder charge necessary to propel them, it took two ignitions of gun powder to shoot a fire arm. You pull the trigger on a flintlock rifle, causing a piece of flint to hit a striker, sending a spark into a small amount of gunpowder in the PAN, which contains a small passage to the barrel. When the powder in the pan ignites with a flash, it sets off the charge in the barrel, which shoots the bullet. If the powder in the pan fails to ignite the charge in the barrel, you have "a flash in the pan." Now mostly used metaphorically to mean a success that does not lead to further successes, a one-hit wonder.