As for gas versus electric cost, here's what I see in Berkeley:
I presently use gas for a tankless water heater, a gas dryer, and a gas range. My gas bill last month was about $11 for 7 therms. The heat value of 7 therms is about the heat value of 200 kWh, but for comparison, I will assume the electric appliances will be twice as efficient (e.g. heat pump water heater, induction range, etc). So I would need roughly 100 kWh to replace that gas consumption. If I could buy those kWh at $0.10/kWh, it would be break-even, but electricity is most expensive than that here.
PVWatts tells me that at my location and with an 8/12 roof, a 1 kW DC PV system will generate about 1,600 kWh per year. So a 750W DC system would generate enough energy over the year to offset the electric equivalent of my current gas usage. At $3/watt, that would cost be $2,250 (not reasonable as a standalone cost, but as an average cost for part of a larger PV system).
If that PV system lasts 25 years, and $2,250 were part of a 25 year mortgage financed at 4% annually, then the monthly payment would be $12/month. So that's within the margin of error compared to the $11/month for gas (given that the 7 therms usage is probably rounded to the nearest integer). The number would be a bit higher if I accounted for PV degradation over time (assuming the PVWatts number is a first year result, I've not looked at it closely enough to know).