Wikipedia states that ancient Peruvian metalsmiths applied gold with electroplating, citing a 1979 article in The Journal of The Minerals, Metals & Materials Society. I'm not familiar enough with this journal or academia to assess whether the claim is solid, or if later research confirmed or refuted it, but I am skeptical; what would be the source of charge? Why would such a valuable technique be abandoned?
While we associate electroplating with a bench-top current source, it is also possible to use an aqueous solution of a gold compound, the work-piece, a piece of pyrite and one wire to create what is basically a very bad battery that has been short-circuited. The solution being the electrolyte, the (already copper-plated) work piece and the pyrite being the two electrodes. The wire short circuits the battery, thereby leading to the (electrochemical) deposition of the gold.
The whole process also works without the wire, but to a far lesser degree. Thus, an accidental development from the no-wire method to the wire-method is possible without knowledge of electrochemistry.
For example, we can speculate that someone may have tried the wire-less method first (dip piece by, e.g. dangling from plant fibre) and observe poor results. Later they may have accidentally dipped two pieces (one copper, one pyrite) now attached to a wire. The copper one would have better results, but the pyrite would be pitted and not gold-plated. From that, they may try one work piece connected to a disposable pyrite lump to get better results.