Car won't start every time i get gas

I have a 2005 Hyundai Elantra. For the past month, everytime i’ve gone to a gas station to fill up my tank, my car doesn’t start immediatly afterwards and all of my electrical components such as the radio and clock reset. My engine doesn’t even “Chug” when i turn the key but the locks on the doors, the blinkers, clock, radio, and lights flicker rapidly on and off. After about 2 minutes and 20 tries turning my key,the flickering stops and my car eventually starts. What could this possibly be? Help!

I think you need a battery. And REALLY soon, at that.

Does it do it if you just stop and get a soda,no gas?

I second the battery diagnosis. I had a similar problem with mh 1990 Ford Aerostar. Sometimes when I would start the car, the clock would reset. When I stopped to buy gasoline and tried to restart the van, it wouldn’t do anytning and even a jump didn’t work. The battery was too far gone. Of course, this was on a Sunday afternoon–not the most cnvenient time. AAA towed the car to my house. The next day I replaced the battery. I urge you to do it before you are inconvenienced as I was.

Battery or at least clean the terminals. Advance Auto and Auto Zone both do free charging system checks.

That OEM battery is just old enough that is is suspect from the start. Your description points to a battery problem.

I will second (or is it “third”, or “fourth” or…) the battery as the likely source of the problem.

And, I want to add that every day that you delay in replacing a bad battery makes it more likely that you will kill the alternator. The alternator has to “work overtime” in order to try to keep a failing battery charged, and this can lead to much higher costs than just replacing the battery.

It is false economy to try to “just get a few more months” out of a battery when it is giving indications of failure.