John Ayto, Oxford Dictionary of English Idioms, third edition (2009) lists the phrase (in a very brief entry) as "piss and vinegar":
piss and vinegar aggressive energy
The same entry (with an occurrence date appears in John Ayto & John Simpson, The Oxford Dictionary of Modern Slang (1992):
piss and vinegar aggressive energy. 1942–.
A Google Books search finds instances of "piss and vinegar" from 1936 and of "spit and vinegar" from 1960. The earliest match for "piss and vinegar" is from Djuna Barnes, Nightwood (1936):
"Have you thought of the night, now, in other times, in foreign countries—in Paris? When the streets were gall high with things you wouldn't have done for a dare's sake, and the way it was then; with the pheasants' necks and the goslings' beaks dangling against the hocks of the gallants, and not a pavement in the place, and everything gutters for miles and miles, and a stench to it that plucked you by the nostrils and you were twenty leagues out!The criers telling the price of wine to such effect that the dawn saw good clerks full of piss and vinegar, and blood-letting in side streets where some wild princess in a night-shift of velvet howled under a leech; not to mention the palaces of Nymphenburg echoing back to Vienna with the night trip of late kings letting water into plush cans and fine woodwork!
Also, from Robert Penn Warren, "The Ballad of Billie Potts," in Partisan Review (spring 1943) [combined snippets]:
Little Billie was full of piss and vinegar / And full of sap as a maple tree / And full of tricks as a lop-eared pup, / So one night when the runner didn't show up, / Big Billie called Little and said, "Saddle up," / And nodded toward the man was taking his sup / With his belt unlatched and his feet to the fire.
The earliest Google Books match for "spit and vinegar" that a search returned was from "Noah, His Wife, and the Devil," in Memoirs of the American Folklore Society, issue 13 (1960):
Throughout the play the children are full of spit and vinegar and malice, and they show their lack of balance, their youthful hubris, in the final scene, where they march to opposite corners of the world yelling bad names at one another— Ham is called nigger, Shem a chink, and Japheth a paleface. They very much recall some of the dangers of our regressive and adolescent epoch in history.
Evidently, "spit and vinegar" is a tidied-up variant on "piss and vinegar"—and indeed, Robert Penn warren, writing to a poetry anthologist in July 1945, observes that he bowdlerized his own wording with "Steam and vinegar" in order to get it published in the Vanderbilt Miscellany.
I was interested to find in Eric Partridge, A Dictionary of Slang and Unconventional English, second edition (1938) a seemingly independently derived eighteenth-century slang term: vinegar-pisser:
pisser, vinegar-. A niggard; miser: coll[oquial]: C. 18–2.? (in C. 17) a sour fellow: cf. Anon.'s 2nd return from Parnassus, 1602, 'They are pestilent fellowes, they speake nothing but bodkins, and pisse vinegar.' (O.E.D.)
In this case the vinegar piss is a sign not of aggressiveness looking for an outlet but of miserliness seeking to withhold everything from the surrounding world.