here goes.....
1. could be a dirty pilot light not playing on the thermocouple correctly
2.could be a faulty thermocouple
3.could be the overheat thermostat
4.could be the gas valve
my advice get a qualified gas man to have a look at it for you..
Brucey
November 2009