The Enlightenment was a fundamentally bourgeois project. It was the project of the rising capitalist class that was preparing itself philosophically for sweeping away the ideology of feudalism - the Divine Right of Kings, the supremacy of the Catholic Church, miracles and superstition, things that would get in the way of a well-ordered capitalist economy - even as it was taking political power from the feudal system through both economic domination and revolutionary violence. As such, the Enlightenment was a historically progressive movement at the time it was occurring, reflecting the optimism of a class that was rising onto the historical stage.
However, as soon as feudalism was overthrown as the dominant political-economic system, its vestiges suppressed and subordinated to the new capitalist order, at that very moment the bourgeoisie were no longer the rising, conquering, progressive class, but had now become the ones trying to hold back the tide of history and defend their dominant class position against the now-awakening proletariat.
So, all the historical progressivism of the Enlightenment had to come to a screeching halt, and its promise of a truly rationally-organized society of truly equal humans had to be quietly hidden away and forgotten, with its place being taken in mainstream bourgeois thought by various forms of anti-rational, navel-gazing philosophical nihilism and solipsism, which could ease the anxieties of a capitalist class that needed to believe history had come to an end and that the limits of human capacity had been reached.
The Counter-Enlightenment was therefore a reaction against the ideas of rationality and progress from both vestiges of the feudal system, complaining that all the magic had been taken out of the world by deposing the kings and clerics, and sections of the bourgeoisie itself subconsciously understanding that true rationality could never be allowed to take hold, and that everyone had to stop thinking too hard about how the world works, right now. As a romantic, anti-rational, idealist philosophical movement it is fundamentally reactionary and antithetical to the philosophy of the proletariat.
Before the total stagnation of capitalist philosophy, the last gasp of progress left from the tradition of the Enlightenment was the work of Hegel, whose dialectical idealism was the most advanced level that bourgeois philosophical thought ever reached. More importantly, it laid the groundwork for his students, Karl Marx and Friedrich Engels, to develop dialectical materialism, an advance beyond all capitalist philosophy into a philosophy worthy of the new rising class, the proletariat.
So the philosophical lineage of Marx traces back directly through the Enlightenment, but his work both transcends it and at last fulfils its latent promise.