The “Baghdad battery” is three artifacts which were found together: a ceramic pot, a tube of one metal, and a rod of another. The current interpretation of their purpose is as a storage vessel for sacred scrolls from nearby Seleucia on the Tigris. Those vessels do not have the outermost clay jar, but are otherwise almost identical.
Wilhelm König was a professional painter who was an assistant at the National Museum of Iraq in the 1930s. When he returned to Germany in 1940 he authored a paper offering the hypothesis that they may have formed a galvanic cell, perhaps used for electroplating gold onto silver objects.