Market effects affect to the economic perspective, but considering the transformation of fuel to heat, gas is sure to be more efficient. Electricity used to run the heater is generated by burning something and running a turbine - a process that itself runs with around 30% efficiency. Add to that the power loss from electricity distribution. 300% efficiency on the heater isn't enough to break even so that you'd get as much heat from the same amount of gas burned locally versus in a power plant.
Well, ok, so 30% thermal efficiency at the power station, and 10% loss in the transmission lines? That gives us .3 * .9 * 2.5 = .68, or 68% thermal efficiency. That compares favorably to the manufacturer-claimed 62% efficiency of the gas heater I cited above. I can even imagine a scenario where an architect could design a house so that heat source of the water heater is near the heat sink of the fridge. In that case, the coefficient of performance of both devices would improve.
In case this wasn't obvious before, let me state this very clearly: Over 30% of the energy content of the natural gas used by your water heater goes up the chimney and is not used to heat the water. Gas water heaters and furnaces are NOT 100% efficient.
 Wikipedia claims that conventional external combustion (i.e., steam) power plants have a thermal efficiency of 33%.
 Wikipedia claims that transmission and distribution losses nationally averaged 6-7% in recent years.
This is neither here nor there, but it strikes me as interesting that the most efficient energy management in a home is just ensuring that your interior environment stays stable and isolated from the exterior as much as possible.
Okay, you got me. Still, burning stuff locally is in the same ballpark as running a heat pump with the electricity. Should microturbines become feasible to buy and operate in every home, it would be the most efficient way, running a heat pump by a turbine of your own and using the waste energy as heat source as well.