The phenomenon of electricty has been known at least from 2750 BCE in hieroglyphic texts by means of shocks from electric fish. Thales of Miletos made descriptions of static electricity in 600 BCE. In 1600 the English physician William Gilbert distinguished magnetism from static electricity formed by rubbing amber. The word electricity comes from the greek word "elektron" for "amber". Benjamin Franklin proved the lightning was an electric phenomenon in 1752 with his kite experiment.
Luigi Galvani (1737-1798) discovered 1780 that a frog muscle hanging in a brass hook twitched when he touched it with an iron scalpel. He believed the energy came from the muscle and called this "animal electricity"--a new form of electricity which is not a bad description.
However, the contemporary colleague Alessandro Volta (1745-1827) disagreed and thought it had to do with the two different metals connected with a moist intermediate. He proved this experimentally and published it 1791. In 1800 Volta invented the first battery based on this principle which was called the Voltaic Pile. Batteries were later used in the early telegraphs in the latter part of the 19th century.
Nothing was of course known about the mechanism for the twitching of the muscle at the time. But with today's knowledge it is possible to say that Galvani was in part correct when he said the twitch came from the muscle itself. Because the current in the muscle, elicited by the potential from the two different metals, must have given rise to an action potential in the muscle which then caused a contraction via the biochemical system in the muscle. Galvani thus had initiated the field of muscular and neuro physiology.
Galvani studied to become a physician like his father in Bologna. Before medicine he studied theology for a while. He married Lucia Galleazzi in 1764. He became the president of the University of Bologna 1772. He published his discovery as late as 1791 and must have been considered unusually old for making a brake-through in science.
Volta was from Como in Italy and educated in the public schools on site. He became physics professor in the Royal School in Como. He became professor in experimental physics in 1779 at the University of Pavia where he stayed for 24 years. In 1794 he married Teresa Peregrini with whom he raised three sons.
Data from Wikipedia