Communism, anarchism, and all of those things grew out of the same 19th century socialist philosophical movement. Bakunin and Marx were contemporaries, they even met each other a few times.
Actually, the ideal communist system that Marx had in mind was anarchist in many ways, even though some anarchist rules are violated.
At the beginning of the Russian revolution, many workers began functioning in very anarchist forms of organization, for example, the "soviets."
50 years earlier you'll see the same thing in the
Paris Commune. You can also check out the earliest large scale manifestation of utopianism with
Robert Owen. You'll find him dealing with anarchist ideas, even though his time is a half century before anarchism becomes a social philosophy in the West.