Inoperative; broken. The term is also used to mean fallen over (on one's back)
This is a 20th century phrase, probably of military origin. There's certainly no mention of it in print prior to WWII. It has been suggested that the term derives from the behaviour of aeroplanes' altitude indicators, which turn upside down when faulty and display an inverted 'W' resembling a pair of breasts. There's no real evidence to support this speculation and it seems more likely that the phrase is just a vulgar alternative to the earlier 'belly-up', which has the same meaning.
'Belly-up' is an allusion to fish, which float that way when 'dead in the water'. This expression was known in the USA by the 1920s, often related to bancruptcy or other commercial disasters; for example, this extract from John Roderigo Dos Passos' Letters, 1920:
"Labor's belly up completely - The only hope is in the I.W.W." [the Industrial Worker's of the World, a.k.a. The Wobblies]