Heat pump for pool cost more than gas water heater, but they typically have much lower annual operating costs because of their higher efficiency.

You should have a trained professional to perform a proper sizing analysis for your specific swimming pool to determine the required heat pump size.