Choose a gas pool heater if you want fast heat, use the pool mainly on weekends, need spa heating, run the pool in cooler weather, or already have a natural gas service that can support the heater.
Choose a pool heat pump if you use the pool often during warm weather, can wait longer for the water to heat, and want lower day-to-day operating cost when outdoor air is warm enough.
That is the practical answer. Gas pool heaters and heat pumps are not equal tools. A gas heater creates heat by burning natural gas or propane. A heat pump moves heat from outdoor air into the pool water. That difference affects speed, cost, installation, service, and comfort.