It happened to my facelift several times. It was the solenoid failing to operate - you should hear a click/motor drive but nothing was happening. I found that if you just kept locking & unlocking via the key, it would eventually work.
My solution was to just remove the issue altogether by removing the locking pin. Grip it and rotate counter-clockwise and the bayonet fitting releases. The flap is held shut by a spring or cam so there hasn't been an issue with the flap flying open, and the charge port area remains dry. (Pre-Facelift versions might need a bit of tape to hold the flap closed - the "James & Kate" video mentioned previously shows this.)
When my car goes for a service, I'll ask them to check it out and hopefully they'll fix it. If not, I don't mind doing without the lock. If nothing else, not having to lock/unlock makes charging just a tiny bit easier.