In reply to Blue Straggler:
Dodgy thermostat I would guess. They
Usually a combined gas valve/thermostat with thermocouple type device for temperature control/flame failure detection
It might have a replaceable thermocouple but generally the symptoms for that would be it would hold in on initial lighting
Either way you need someone to replace it for you unless you are "competent" which generaly means gas safe registered for the appropriate area.
Price may be prohibitive as they can be £50 or more plus initial call out, then they order part and fit so depending on the age of the cooker might be worth replacing
http://www.cooker-parts.co.uk/10228/info.php?p=12&cat=14829
see link above for an idea of the type of component.
PS I previously was CORGI but am out of ticket so seek advice from a competent person who is up to date.