Check the thermocouple, which is in the flame of the pilot light.
It is an electrical device which signals the gas valve to shut in the absense of pilot flame.
It will have the appearance of thin copper tube, held with a clip at the flame end and a nut securing it to the gas valve.
You can purchase a universal thermocouple for a few pounds from some DIY stores and any heating supply merchant.
Pete.
January 2007