Most gas ovens and stoves today use systems that make them as safe as their electric counterparts. Back in the day, when gas appliances required manual lighting, the user regulated the flow of gas to the burners, and that was a recipe for disaster. Even the antique stoves popular today have a safety valve that takes the guesswork out of the gasflow.
Standing Pilot Ignition
Older stoves like the popular antique Wedgewoods, O'Keef and Merrits and Magic Chefs have a mechanical device that works with the standing pilot to ensure that unburned gas never flows freely. The pilot ignites the gas that flows when a chef dials the thermostat and releases gas to the burner. A device called a thermocouple makes this possible. The pilot heats the copper wire of the thermocouple, which creates a milivolt charge. This charge travels down the wire to the safety valve where it attracts a small electromagnet. The magnet holds the valve open so long as a charge is present. If the pilot blows out, it fails to heat the thermocouple, resulting in no electrical charge to draw the magnet, and the safety valve stays closed. Therefore, unburned gas cannot be released accidentally.
Modern stoves save gas because they don't have a standing pilot. Instead, a high voltage electric spark ignites a pilot only when needed, which in turn lights the burner. It's a common misunderstanding to think that the spark simply lights the burner. That free flow of gas and spark ignition would be a step backward in terms of safety. Instead, much like a standing pilot, the spark-ignited pilot heats an element, in this case a capillary tube. The tube heats liquid in a bulb. The liquid expands with heat and puts pressure on a diaphragm which forces the safety valve open.