deus ex machina
1. A god in an ancient Greek or Roman play that suddenly appears in the storyline in order to solve a problem or decide an outcome. The Latin phrase translates to "god from a machine," referring to the machinery that lowered it onto the stage. The ancient Greek play makes use of a deus ex machina in which Apollo arrives on stage to restore order among the other characters.
2. An ending in a performance or story that seems too contrived to be believable to the audience. Modern critics often pan 1980s-era television shows for the typical deus ex machina that writers often used to neatly wrap up episodes.