Attributed to Churchill and Mark Twain among others, however, first popular modern usage is generally attributed to comedian Frank Fay (best remembered today for being Barbara Stanwick's first husband, with their relationship being the inspiration for the film A Star is Born):
http://quoteinvestigator.com/2014/06/24/wit-battle/
Quote Investigator: There is no substantive evidence that the Bard of Avon penned this jest. Attributions to Mark Twain, Oscar Wilde, and Winston Churchill are also unsupported. The earliest evidence of comparable word play located by
QI appeared in an 1866 novel which the author, Abby Buchanan Longstreet, released under a pseudonym. Longstreet described a character blushing and then employed an instance of the trope. Boldface has been added to excerpts:
1
The blood swung its reddest pennant out over the boy’s cheeks, but Trissilian’s mood was not to be resented, or resisted.
A battle of wits was to be fought, and the Boy in Blue was unarmed to-night.
[...]
In December 1928 Walter Winchell’s widely-distributed gossip column printed an instance of the joke. The punch line was credited to the comedian and actor Frank Fay who was engaged in a sharp disagreement with an interior decorator:
3
“Mr. Fay, is this going to be
a battle of wits?”
“If it is,” was the indifferent retort,
“you have come unarmed!”