LOTS of times. A sample (incomplete) list:
From Russia With Love: Red Grant was watching Bond at the gypsy compound and Bond would have been stabbed in the back during the fight if Grant hadn't shot the anonymous attacker.
Goldfinger: If Bond hadn't heard Goldfinger mentioning "Operation Grand Slam" he would have been cut in half by Goldfinger's industrial laser (it was sheer luck that he happened to be in the right place at the right time to hear it).
Thunderball: Largo would have shot Bond if Domino hadn't came in and killed him. Lucky timing.
On Her Majesty's Secret Service: Bond was lucky he was now being played by George Lazenby, because now Blofeld didn't recognize him (this one's a joke).
OHMSS (again): Bond just happens to run into Tracy and is able to escape Blofeld's men. What luck!
Diamonds are Forever: Bond would have been incinerated if not for Shady Tree's great timing (in pulling him out of the incinerator).
Moonraker: The canister carrying a deadly nerve gas that Bond has in his pocket never breaks during his very violent fight with Chang.
License to Kill: Bond is about to be sent back to the UK when Sanchez's men come in and kill the agents who were going to retrieve him. He wouldn't have died, but it would have meant an abrupt end to the movie…
Not listed: The numerous times Bond was (luckily) assigned gear by Q that is perfectly suited to the plot (laser watch, underwater car, etc.)