A God from the Machine.
It was common practice in some Greek and Roman plays to lower (by means of a crane, i.e., a machine) an actor (who was playing the role of a god) onto the stage in the last act, who would then proceed to neatly solve all of the problems, get everyone out of trouble, and neatly wrap up the play.
It is now used in reference to any plot device that was not foreshadowed, or is not believable, or just doesn't fit, that is used to solve any otherwise insolvable problems. Someone suddenly inherits a million dollars, the cavalry pops up in the nick of time, the Master Detective had the missing piece of the puzzle all the time.
A contrived wimp-out on the author's part.
Pronounced 'DAYes eks makena', or 'ma-kuh-nuh', or 'MAK-uh-nuh'. There are multiple acceptable pronunciations. Rose Thorn reports 'day-us aches mashina' as a correct pronunciation. Excalibre reports that the Latin pronunciation is approximately "day-oos eks mah-kee-nah".
The plural is dei ex machinis.