From the phrasal verb pull off, combining pull (Old English pullian, to draw or tug) and the particle off (indicating completion or detachment). The idiomatic sense of succeeding at something against the odds derives from the physical image of wrenching a difficult object free — getting the thing done despite resistance. Widely attested in informal English from the 19th century.