On my 2003 4Runner, the spring fell out on one of my refuel stops at the gas station. Luckily, I saw it and picked it up. Then I had a hard time opening the door. So I popped the spring back in place and now it works like a charm.
I had a similar problem in that the gas tank cap was not staying tight. Like you said, i would click, but would loosen immediately. But buying a new original gas tank cap from the Toyota dealer fixed the problem.