AA battery in parallel
The earliest known artifacts that may have served as batteries are the Baghdad Batteries, from some time between 250 BC and 640 AD. However, it is not known what electrical function they may have served, and if they were in fact batteries at all.
The story of the modern battery begins with the 1786 discovery by Luigi Galvani of what he thought was animal electricity. It involved what we now recognize as an electric circuit consisting of metal A, in contact with a frog's leg and Metal B in contact with the leg AND Metal A, thus closing the circuit. In modern terms the frog's leg served as both electrolyte and detector, and the metals served as electrodes. By 1791 Alessandro Volta realized that the frog could be replaced by cardboard soaked in salt water, and another form of detection could be employed. Having already studied the electrostatic phenomenon of capacitance, Volta was able to quantitatively measure the "voltage", or electromotive force (emf) associated with each electrode-electrolyte interface, finding the emf to always be on the order of a volt. Such a device is called a voltaic cell, or cell for short. In 1799 Volta invented the modern battery. He did this by placing many galvanic cells in series, literally piling them one above the other. This Voltaic Pile gave a greatly enhanced net emf for the combination. (In many parts of Europe, batteries are called piles.) Later researchers placed galvanic cells in parallel. Such banks of cells are called batteries, presumably after the earlier use by Benjamin Franklin to describe Leyden jars (capacitors) in series and in parallel.
Although early batteries were of great value for experimental purposes, their limitations made them impractical for large current drain. Later batteries, starting with the Daniell cell in 1836, provided more reliable currents and were adopted by industry for use in stationary devices, particularly in telegraph networks where, in the days before electrical distribution networks, they were the only practical source of electricity. These wet cells used liquid electrolytes, which were prone to leaks and spillage if not handled correctly. Some, like the gravity cell, could only function in a certain orientation. Many used glass jars to hold their components, which made them fragile. These characteristics made wet cells unsuitable for portable appliances. Near the end of the 19th century, the invention of dry cell batteries, which replaced liquid electrolyte with a paste made portable electrical devices practical.