In his landmark book of genre film analysis, James Bond in the Cinema (1981), the great John Brosnan often wrote about "the sting in the tail," that moment near the end of a James Bond film, when the surviving villain gets the jump on 007, and there's one last thrill before end credits roll. Think of Mr. Wint and Mr. Kidd spoiling a perfectly nice ocean cruise at the end of Diamonds Are Forever (1970), for instance, or Nick Nack doing same in The Man with the Golden Gun (1974).
The sting in the tail/tale comes in many shapes and sizes. Often the final "sting" is a development you don't expect, something that ratchets up the terror, and changes the very nature of the narrative, even setting up the grounds for a sequel.
A great play on this aspect of the convention occurs in Phantasm II. Mike (James LeGros) insists to a terrified Liz (Paula Irvine) that the terror around them is all a dream. Then the Tall Man (Angus Scrimm) appears and punctures that particular balloon. "No...it's not!" He croaks. Fade to Black...
Another sting in the tail/tale ending I admire tremendously arises in Sam Raimi's The Evil Dead (1983). Here, Ash defeats the Deadites and limps out of his cabin in the woods, only to be pursued -- one last time -- by a horrible, unseen force.