http://en.wikipedia.org/wiki/History_of_the_battery suggests that basic knowledge and early experimentation with the known concept of electricity and a disagreement about whether a dead frog's leg can generate electricity inspired the battery. Volta notes those whose work he relied on.