The phrase
"hail mary" usually refers to a desperate or last-ditch attempt to achieve success or get out of a difficult situation. It is often used when all other options have failed, and someone makes a final unconventional or risky move in the hope of a positive outcome.
Full definition