Deus Ex Machina
Literally "god in the machine" (or "ghost in the machine" as The Police put it), deus ex machina is a literary device in which divine intervention is employed to get the protagonist out of a sticky situation or untangle an ugly plotline.
Dramatic irony is when the words and actions of the characters of a work of literature have a different meaning for the reader than they do for the characters. This is the result of the reader having a greater knowledge than the characters themselves.
Narrative Arc - What is Narrative Arc in Literature?
Sometime simply called "arc" or "story arc," narrative arc refers to the chronological construction of plot in a novel or story. Typically, a narrative arc looks something like a pyramid, made up of the following components: exposition, rising action, climax, falling action, and resolution.