Yellow Journalist said:
Actually, the Gravity Gun getting superpowered is complete deus ex machina. Its an EXTREMELY fortuitous happenstance that comes completely out of nowhere and happens to be exactly what Gordon needs to finish the battle, to the point that taking away all his other weapons as payment doesn't hinder him in the least. There is no hint at all that this sort of thing can happen: The Gravity Gun up until that point has never malfunctioned when around Combine tech (even going through their teleporter didn't foul it up), and has never even begun to demonstrate that it was capable of manipulating living flesh beyond blasting headcrabs. Hell, it even starts glowing a different color for no apparent reason. Granted, we don't know really anything about how the GG or Combine tech works (other than that it involves manipulating gravity fields...somehow), but ignorance of its workings doesn't mean it isn't impossible. As Asimov said, its indistinguishable from magic, and suddenly getting stronger for no real reason doesn't make sense in any field.
As for Bond, you are right, but there is at least one big example. In Goldeneye, when Bond uses his watch laser to get out of the train before it explodes. Its DxM because, up until that point, no indication was given that Bond had a watch laser. It wasn't mentioned by Q, and he doesn't use it beforehand. He just sort of remembers he has it right at a convenient moment. I'm sure there are others, but that has always been one of my favorites.
As for my contribution to the thread, I'm going to go with two of my favorite movie examples. In The Bad Seed, the villain just about gets away with murder with absolutely no retribution, just to get struck by a lightning bolt completely out of nowhere. And, one of the most famous (and literal) examples: The ending of Raider's of the Lost Ark. Who knew that opening the Ark of the Covenant would LITERALLY cause God to kill you in the messiest way he could think of? Or that not looking at it would somehow protect you?
As far as video games go, The Magic Vortigaunts from the HL2 episodes, the finales of Death Toll and Dark Carnival in Left 4 Dead, and the ending of the vanilla Dawn of War 2 campaign all come to mind.