|Style over substance|
Contrary to the name, the Baghdad battery is not a single artifact. A number of them were found in a village near Baghdad, Iraq, in the 1930s. A German guy found them in the collections of the National Museum of Iraq and later published a paper hypothesizing that they were primitive galvanic cells (i.e. electric batteries).
Building a simple galvanic cell was well within the technological means of the time; the question is why on earth they would have thought to. The guy who found them in the museum speculated that they were possibly used for electroplating precious metals. In modern times, electroplating was discovered multiple times independently within a few years of the invention of the galvanic cell; if someone happened to assemble something that worked as a galvanic cell, electroplating would follow as soon as they started experimenting with it.
A number of authors have decided that this is a confirmation that Ancients Possessed Advanced Technology. Depending on the favorite brand of woo of the author, the source of the advancement may be Atlantis or aliens.