A gas stove that makes a clicking noise — even when turned off, or with a burner lit— might be a sign that moisture or dirt is interfering with the functioning of the spark ignitor (or surface burner ignitor), or a part of the electronic ignition system needs replacing.
Gas stoves that use an electronic ignition system do not have a standing pilot light. Instead, the spark ignitor (located near the burner) creates a spark which ignites the gas flowing from your burner creating a cooking flame. Overflowing pots, cooking debris, moisture and dirt can sometimes interfere with the spark ignitor, causing a persistent clicking sound.
Before working on any appliance, make sure to disconnect the power and utilities (water, gas) to the appliance.
You can try cleaning the area around your spark ignitor (including the burner cap and the holes around the cap) using a tooth brush, or a nylon scrubbing pad to remove any dirt or grime covering these parts. You can also try taking apart the burner (removing the burner cap) and propping up the stove cooktop to dry out the surrounding area, especially if you have a spill or pot overflow.
Assemble the burner, turn on the gas and power and test out your stove burner again. If you continue to hear a clicking noise, then there might be an issue with the ignitor switch or spark module.
The ignitor switch controls the voltage sent to the spark module and is operated by the knobs on your stove. Over time, one or more of these switches can break. Some stoves have the switches all wired together as one part, so you cannot replace an individual switch.
Another part that could be faulty is the spark module located at the rear of the range or underneath the cooktop. The spark module sends an electronic pulse to the surface ignitor that helps light the gas on the burners. After checking the surface burner ignitor switches, check this part to see if it needs to be replaced.