What makes a gas water heater not heat when it is burning?
The burner system is pretty simple. The thermocouple is heated and tells the gas valve it's OK to turn the gas flow on to the burner. I would check the thermocouple first. If that doesn't seem to be the problem, you will have to look to the gas valve itself, although that might be something you want a professional to check first.
If the blower is heating the water but it is coming out intermittently warm, then cold, and then hot (or some combination similar to this), then you may want to drain the tank, since sediment may be clogging up the works.