The phrase 'throwing a Hail Mary' originated from American football to signify a desperate attempt to throw the ball forward, hoping against hope to score in a last-minute effort when it appears nearly impossible to do anything else. The word slowly came to be used in everyday conversation to signify the same thing: a risky last-minute effort to fix something.