Dating as far back as ancient Egypt, people were remotely aware of the idea of electricity in some form. Electric FISH** were seen as river guardians of the fish and there are references to them in 2000+ BC [1]and even later by Greek, Roman and Arabic naturalists such as Pliney the elder.
As early as 600 BCE we see that Thales of Miletus made several observations regarding static electricity, including the relative magnetism granted by rubbing a rod of amber on a cat's fur, for example. It wouldn't be until the 1600s when more documented research regarding electricity would be (ahem) conducted. William gilbert would be the first and relatively soon after the likes of Boyle and Ben Franklin would begin to investigate the properties of electricity. At that point the research concerning static electricity sort of melded into looking at all forms of electricity, including the discovery that lightning was in fact a form of electricity, but that's not the question.
So in summary, people knew about it, but it wasn't seen as some kind of witch craft as far as I can tell. It was just seen as a weird part of nature.
Edit: Fish, not eels. Good call Alpy94
Double edit: Several people have referenced Babylonian Urns. The reason you don't see any reference to them is because they were not proven to be batteries or have stored any kind of electricity. I'm not an expert on the subject but a cursory examination reveals that the notion that the urns were primitive batteries is false. I've seen 3 questions about the urns and the mods have removed them all due to the lack of evidence indicating they are relevant to this topic.
[1]:Moller, Peter; Kramer, Bernd (December 1991), "Review: Electric Fish", BioScience (American Institute of Biological Sciences) 41 (11): 794–6 [794], doi:10.2307/1311732, JSTOR 1311732
[2]: Stewart, Joseph (2001), Intermediate Electromagnetic Theory, World Scientific, p. 50, ISBN 981-02-4471-1
The name "electricity" comes from electrum, the greek name for amber, which when rubbed against wool cloth creates static electricity. It's something I learned in physics class incidentally, I believe it's mentioned in every introductory course/textbook on the topic. So actually by definition static electric shocks were the discovery of electricity. The notion that electricity was more than just that came later; even if other forms of electricity were known (lightning, electric eels), they weren't called after amber until much later.
Nikola Tesla tells the story from his childhood. This gives some insite into the question. (Note: Macak means Tomcat is Serbian) Quoting:
It happened that one day the cold was drier than ever before. People walking in the snow left a luminous trail behind them, and a snowball thrown against an obstacle gave a flare of light like a loaf of sugar cut with a knife.In the dusk of the evening, as I stroked Macak's back, I saw a miracle that made me speechless with amazement. Macak's back was a sheet of light and my hand produced a shower of sparks loud enough to be heard all over the house.
My father was a very learned man; he had an answer for every question. But this phenomenon was new even to him. "Well," he finally remarked, "this is nothing but electricity, the same thing you see through the trees in a storm."
Full story: http://www.pbs.org/tesla/ll/story_youth.html