To do something with in an impromptu manner, improvising, with little preparation.
Authors have long used 'wing' as a verb and referred to birds that 'winged their way' and later, metaphorically, to time, love etc 'winging its way' to a recipient. That's not the 'winging it' we are concerned with here though, which has nothing to do with wings with feathers. This expression might also be thought to be derived from 'on a wing and a prayer', which alludes to aircraft that return to base more in hope than expectation. That's not the origin either and, if anything, the derivation is the other way about. 'Winging it' is a theatrical expression which refers to impromptu performances that given by actors who had hurriedly learned their lines while waiting in the wings and then received prompts from there.
This phrase dates from the late 19th century and the verb 'to wing' was defined in an 1885 edition of Stage magazine:
"'To wing'... indicates the capacity to play a rôle without knowing the text, and the word itself came into use from the fact that the artiste frequently received the assistance of a special prompter, who... stood... screened by a piece of the scenery or a wing."
The phrase 'winging it' is used in print explicitly in 1933, although it must have been well-established before then, in a book that could hardly be better equipped to explain the meaning, Philip Godfrey's Back-stage: a survey of the contemporary English theatre from behind the scenes:
"He must give a performance by 'winging it' - that is, by refreshing his memory for each scene in the wings before he goes on to play it."