I'd say the Greek Cynics would constitute a counter culture by our definition today. Of course everyone knows the stories of Diogenes but he belonged to a wider school of philosophy countering mainstream Greek society in the 5th century Bce. Their name literally meant dog and this is partly because of these attitudes, as one of their numbers said:
"There are four reasons why the Cynics are so named. First because of the indifference of their way of life, for they make a cult of indifference and, like dogs, eat and make love in public, go barefoot, and sleep in tubs and at crossroads. The second reason is that the dog is a shameless animal, and they make a cult of shamelessness, not as being beneath modesty, but as superior to it. The third reason is that the dog is a good guard, and they guard the tenets of their philosophy. The fourth reason is that the dog is a discriminating animal which can distinguish between its friends and enemies. So do they recognize as friends those who are suited to philosophy, and receive them kindly, while those unfitted they drive away, like dogs, by barking at them"
Diogenes was of course the iconic counter cultural figure, masturbating in public, living homeless in a barrel, eating raw meat, rejecting burial customs, insulting Socrates Plato and Alexander the Great (it's hard to distinguish legend and truth with all these ancient figures) though other cynics like Crates and Antisthenes similarly lived lives of poverty and their attitude likely influenced other counter cultural groups in antiquity (early Christian monastic communities would probably be another good example of counter culture though much later)
Source: Frederick Copleston's History of Philosophy Vol. I
Two movements I find interesting is the agrarian socialist movement named the Diggers. They desired to be able to farm on common lands in England in the mid 1600's. They also are claimed to have advocated for a more democratic form of government and for perform socially conscious acts, such as providing free food to the poor. Some of the modern hippie movement drew inspiration from the and established a modern digger movement in San Francisco during the sixties. Another movement to check out is the Luddite movement in England in the late 1700's in England. It was a reaction to modern " for the time" industrial equipment being built. Essentially the workers were afraid that the new equipment would displace them from their job.
This comment may be insufficiently sourced, i won't argue if it gets deleted, but i wholly recommend reading R.U. Sirius' Counter-culture through the ages on this subject.
Their thesis is that the Jewish people at the time of Abraham is the earliest documented counterculture. Some kind of pastoral peaceful revolt fighting the oppression of bureaucratic and militarized Babylon.
Not one of the earliest examples, but one you hopefully find interesting: Many people associate Hitler's Third Reich with widespread militarism and nationalistic fervor. Membership in the Hitler Youth (or female Bund Deutsche Maedel) was compulsory for youth, and with its strong partnership with the SS served as both party indoctrination and training that funneled boys into military service. But there were two fascinating counterculture movements among Nazi teenagers who rejected the Nazi party.
First were teen gangs who openly antagonized the Hitler Youth and Nazi Party. Names and gang insignia varied regionally, with the "Edelweiss Pirates" becoming the most prominent. Most sprang from a mockery of the Hitler Youth, sporting their own matching uniforms of traditional German lederhosen, American-style broad hats and garish checkered shirts, or matching pins and rings. Estimates vary wildly, but conservatively 5% of German youth were affiliated with these "halbstarke" (literally "half strengths" or half-grown as the authorities called them) rebels. Early gangs merely sought to enjoy Hitler Youth-style camping and activities without the party politics and propaganda, and enjoyed skirting travel restrictions and creating anti Hitler Youth song parodies and graffiti. These activities escalated into open defiance, stealing Nazi supplies, aiding French POWs, beating up Hitler Youth members, looting, and open violence against the regime. It is important here to note that the Pirates themselves reject the label of a resistance movement, and saw themselves as rebellious teenagers. The Gestapo responded harshly to their actions with prison time, fines, youth work camps, and concentration camps. In one instance twelve young Pirates were hanged.
A second movement, the non-violent "Swing Youth" were generally more upper class, and their resistance to the Reich centered on a love of American jazz music and a good time. Like the Pirates they rejected the Hitler Youth, instead preferring to wear their hair long and adopting British and American fashions. They hosted wild parties in backrooms and basements, and accounts read like a precursor to musically-inspired countercultures of the 60s. With both the Swing Youth and Edelweiss Pirates sexual liberation and casual sex was encouraged, and the groups' coed nature was actually one of their more threatening aspects to the Reich.
A few sources:
Biddiscombe, Perry. "'The Enemy of Our Enemy: A View of the Edelweiss Piraten from the British and American Archives." Journal of Contemporary History. 30.1 (1995)
Bleuel, Hans Peter. "Sex and Society in Nazi Germany." Trans. J. Maxwell Brownjohn. New York: Bantam Books, 1974.
Kersten, Joachim. "German Youth Subcultures: History, Typology, and Gender-Orientations." Gangs and
Youth Subcultures. Ed. Kaylee Hazelhurst and Ed. Cameron Hazelhurst. New Brunswick: Transaction Publishers, 1998. 67-93.
Meyer, Walter. Interview by Katie Davis. 02 Aug 1996. United States Holocaust Memorial Museum. Film. http://collections.ushmm.org/artifact/image/h00/00/h0000120.pdf.
(Hans and Sophie Scholl's White Rose student movement is also worth a look, though I think it's best to classify them as merely a notable antiwar movement rather than a unique counterculture).
Thanks for the question. While it generated some good answers, this thread has been removed because it is a throughout history question, with the answers lacking a common historical focus. I would encourage you to submit this to /u/caffarelli as a "Tuesday Trivia" feature.