Before you replace it try this:
First wiggle the relief lever back and forth open and close to dislodge any possible debris that may be causing it to leak...be careful...don't scald yourself.
If this doesn't work...re-establish the air pocket at the top of the tank.
Water Heater Air Pocket
Shut off the water supply, open the relief valve until water stop coming out, close it, turn the water supply back on.
This will reestablish the air pocket in the water heater, giving the water some place to expand to when it is heated.
Water Heater Air Pocket