In Science and Technology
A battery is any device that stores energy for later use in electrical form. Strictly, a "battery" must contain more than one cell, but in everyday speech, "battery" refers to a cell itself. Most often, battery refers to a type of chemical battery, but the term originally referred to a lot of capacitors (then called Leyden jars) hooked up in parallel. Connecting them in a group made them able to store more energy and to release that energy over a longer time. Scientists (was it Ben Franklin who coined the term?) drew an analogy between the group of jars and a group of artillery. An apt analogy considering that about the only use the early experimentalists had for electricity was to entertain friends by shocking them. The first chemical battery was the voltaic pile invented by Alessandro Volta in 1800.
In Military Matters
Whenever cannons or some other type of artillery was grouped together, that group was referred to as a battery. Battery Park at the south end of Manhattan Island in New York city, is the place where the artillery that defended the city were clustered as a battery.