2005 Buick Rendezvous stops on declines

My 2005 Buick Rendezvous is great except that one time I was going down a steep hill and lights came on the dashboard then the engine turned off. I coasted into a “flat” area, and finally was able to start it again. The other time I was parked on a decline (front end downward) and it wouldn’t start until we charged the battery. During the charge a fan sound was apparent. There definitely was enough gas.



In both cases, I did not need a new battery. HELP!