Sounds as if it's this device playing up .....
Heating appliance safety
Many gas-fed heating appliances like ovens and water heaters make use of a pilot light to ignite the main gas burner as required. If the pilot light becomes extinguished for any reason, there is the potential for un-combusted gas to be released into the surrounding area, thereby creating both risk of fire and a health hazard. To prevent such a danger, some appliances use a thermocouple as a fail-safe control to sense when the pilot light is burning. The tip of the thermocouple is placed in the pilot flame. The resultant voltage, typically around 20 mV, operates the gas supply valve responsible for feeding the pilot. So long as the pilot flame remains lit, the thermocouple remains hot and holds the pilot gas valve open. If the pilot light goes out, the temperature will fall along with a corresponding drop in electricity, removing power from the valve. The valve closes, shutting off the gas and halting this unsafe condition.
You'll need a Corgi registered plumber/heating engineer. Shouldn't take long to fix , but what's the minimum going rate now ...�35-50 ???