The arrival of The Cavalry* is the release valve which allows the overwhelmed heroic forces to finally make a decisive blow against the enemy that threatens to wipe them out. Unfortunately this is a trope that's been played too often in various forms of fiction and has started to wear thin. Which means that to get it to work you have to do it right.
If the heroes were not expecting any help, and there was no reasonable way for anyone to know they needed help, then sending in a Cavalry is essentially a GM deus ex machina to get the players out of a hole. They may well have dug it for themselves, in which case it might be better to let them suffer the consequences. Hopefully the hole is not of the GM's making, as this is a sign of poor adventure planning.
On the other hand, if the heroes made specific arrangements to call for help, and they are just hanging on waiting for the help to arrive, then this is a perfect time to make use of The Cavalry. The game is now set up specifically to allow the heroes to stare into the face of defeat, and be saved at the last possible second, without feeling fake or contrived.
There's a middle ground too. Where the players might not specifically be waiting for some help which they expect, but there is a reasonable chance that someone actually knows they might need help and is in a position to do something about it. If they tell the townsfolk that they will be off exploring the haunted castle and slaying the dragon who dwells within, then if the townsfolk don't hear from them for a few days they might just mount a rescue party.
So if you're going to go trekking off into a dangerous dungeon, let the townsfolk know.
* A figurative "Cavalry", not necessarily a literal cavalry - although sometimes that works. Which just makes it cooler, really.
Transcript
Luke: I turn off the targeting computer.
R2-D2: What the hell? It's too late to change your mind now!
Luke: I'm taking the shot myself.
R2-D2: Without my help, you can widdershin and shanty-wiggle all you like, but you'll need a critical just to nick the grille!
Darth Vader: Speaking of lining up a shot...
Luke: Dodge! Dodge!
Darth Vader and Clone Pilots: We have you now...
Han: Suddenly, the Millennium Falcon appears behind Vader!
R2-D2: Oh look, the prodigal pilot returns.
Chewbacca: All for'ard cannons fire!
[SFX]: Pow! Kaboom!
Darth Vader: What?!
GM: <roll> Wow. Okay, Vader, you're distracted and lose control of your other wingman. <roll> He clips your fighter, sending you <roll> spiralling out of control into <roll> space.
Clone Pilot 2: Whee! {yellow speech bubble}
[SFX]: Kerunch!
Darth Vader: How rude.