On a wing and a prayer
This phrase originated with the WWII patriotic song Coming in on a Wing and a Prayer, 1943, by Harold Adamson and Jimmie McHugh, which tells of a damaged warplane, barely able to limp back to base. Adamson and McHugh wrote several patriotic songs in World War II and were awarded the Presidential Certificate of Merit by President Harry Truman.
The phrase hit a chord with the public and there are many references to it in US newspapers from 1943 onwards. It was taken up by Hollywood and a film - Wing and a Prayer - was released in 1944.
The allusion to a strcken aircraft limping home was probably influenced by the earlier term 'winging it', which refers to actors struggling through parts that they have recently learned in the wings of a theatre.
The phrase is sometimes given mistakenly as "on a whim and a prayer", or "on a wink and a prayer".