Then there is the informal baseball usage, in which a “battery” is the pitcher and catcher collectively. The metaphor is obscure, with attempts made to connect it to both the artillery and the electrical senses. The electrical sense fits better, with the pitcher and the catcher being the cathode and anode respectively. John Montgomery Ward gave this explanation in 1888. Attempts to justify the artillery sense are harder, typically with the catcher taking the role of the ammunition supply for the pitcher, who is the cannon itself. The earliest uses I know of use “battery” in the sense of what the pitcher does:
[Active of New York vs. Eureka of Newark 7/4/1864] “As regards the pitching, “Walker’s battery” proved to be very effective in aiding to achieve the result...” [N.B. Walker was the pitcher for the victorious Actives] (New York Sunday Mercury July 10, 1864)
Here is an example incorporating artillery:
[Stars vs. Mutuals 5/7/1870] “As it was evident that the Stars had got the range of Wolter’s delivery, and that they were in for punishing him, the Mutual Captain very judiciously brought Martin in to pitch, and as the noted “shell battery” was placed in position the Stars prepared themselves to face the usually telling fire with the determination to soon silence it.” (New York Clipper May 14, 1870)
Just to confuse the issue, here is a similar use, but this time it is the batter hitting the ball:
[Athletics vs. Mutuals 8/20/1867] “McBride then exercised himself in the foul ball line for twenty minutes, the scorers’ stand apparently being his objective point. By one shot he demoralized friend Meeser, who sat next to us, and by another nearly knocked McAuslan out of time, Gill, of the Clipper, changing his base during the flying of the shells from McBride’s battery.” (Ball Players Chronicle August 22, 1867)
Here is an example of this use as late as 1876:
[Chicago vs. Mutual 6/13/1876] “...Barnes—who became quite the hero of this contest—was the first to face the Mathews [the pitcher] battery.” (New York Clipper June 24, 1876)
The earliest use I know of that is unambiguously in the modern sense is not until 1879, in reference to the Harvard baseball team:
“There is trouble in the college baseball camp, and it all grows out of the fact that Ernst and Tyng are the most effective battery ever presented in the field by a college club.” (New York Clipper May 31, 1879)
By at least 1883 the usage is standard. It appears multiple times in the Spalding Base Ball Guide of that year, once in quotation marks but several times without.
What to make of this? The earlier usage is straightforward, and, at least in some cases, influenced by the recent war. Baseball underwent a shift in pitching in the later 1870s. Previously, a club would usually have one primary pitcher and a backup “change” pitcher, and similarly a primary and a change catcher. There was no particular expectation that the starting pitcher would be matched with the starting catcher, or the change pitcher with the change catcher. This became untenable later in the decade. Pitching was gradually moving from under- to overhand, with curve balls, greater speed, and more arm strain. This resulted in greater wear and tear on both the pitchers and the catchers. Clubs started alternating their two pitchers, or even carrying three. The same thing happened with catchers. Pitchers and catchers were matched whenever possible, so that the catcher would learn the peculiarities of his pitcher’s delivery. This led to thinking of the two individuals--Ernst and Tyng, for example--as a unit.
My guess is that the earlier use of the pitcher’s battery suggested the extended usage, but it was all very loose: not a tight-knit metaphor but a vague waving in the direction of a metaphor. The artillery sense sort of worked, as there was now two elements. A single cannon does not, after all, an artillery battery make. And while the electrical sense works better, this looks to me like a retrospective explanation.