When something goes wrong with a decent plan, you say it has gone awry. You accidentally forget your backpack in the airport? That's a mistake. When the airline loses your suitcase? That's when something has gone awry.
Wry means "twisted"—so going awry means getting "twisted up." Awry is similar to askew, which means "off, out of line," though when you compare the roots skew "turned at an angle" and wry "twisted" you see the subtle difference between the two words.