Hi there
Depending on the actuall model you have there I suspect the cause is likely to be one of two things – either a faulty thermostat or a week or ruptured diaphram that is activated by the water valve applying pressure to it which controls the amount of gas that can flow.
In either case they are not ready repairs that I would expect the average homeowner to be able to complete either safely or correctly so in the interests of safety and accuracy I would recommend you obtain the services of a suitably experienced serviceperson familiar with your water heater’s operation.
Selgas Services Ltd
Craftsman Gasfitters, Plumbers, Electrical Service Technicians