A gas dryer works by blowing air through a burner assembly which heats the air, using a gas valve, ignitor and a flame sensor. Within the ignitor are ignition coils that function to take energy from the ignitor and channel it into opening the gas valve so the gas can flow through.
When the dryer is turned on, power is applied to the ignitor and it starts to glow hot. Heat from the ignitor then heats the flame sensor which opens a circuit, applying power to the ignitor coil.
Current flows through the coil, opening the gas valve and the gas is ignited. The heat continues to keep current flowing through the coil until the the dryer's control thermostat cycles off, stopping the circuit to the gas burner assembly so the coils lose their power and gas flow is shut down.
Sometimes the ignition coils in gas dryers can go bad. If you suspect you have this problem, test it by checking the ignitor when the dryer is on.
If the ignitor glows for several seconds when powered up, then goes out, the problem is probably the ignition coil. Use a multitester to test the coil for resistance.
The multitester should change from a reading of infinity to roughly 1,300 ohms when applied to the coil. If the reading stays at infinity or is substantially different from 1,300 ohms, it is an indication the coils need to be replaced.