I just had a similar problem. While gassing up my car I heard the same clicking sound and noticed the gas door lock opening and reopening the already open gas door. the solution I found was the opening lever was stuck down. I popped up the lever and it stopped. Point being check the door lock buttons to see if one is stuck down.
I had the exact same thing (doors locking & un-locking) occur on a chrysler vehicle. It occurred after using that vehicle to jump-start another. Seemed to me like it may be something in the processor that might clear up if it was reset. Called the dealer & asked them how to reset the computer - they told me that there was no way for me to do so & told me ‘you’ll have to bring it in’. Rather than doing so, I disconnected the battery for about an hour, assuming that that would be long enough for the power supply to drain down, forcing a reset.
It worked.