Tough question, and a very good one. Wish I was a historian now, to bring many references. I’ve read enough though, to jump into the fray…
An excerpt from Wikipedia may help as a preliminary: The Spanish Civil War was a civil war in Spain fought from 1936 to 1939. Republicans loyal to the left-leaning Second Spanish Republic, in alliance with anarchists, fought against a revolt by the Nationalists, an alliance of Falangists, monarchists, conservatives and Catholics.
First of all we should stablish what was the Spanish Civil War. I do not know if this makes sense academically, or even in english, but I would like to call it a heterogeneous war. For example, it’s been portrayed as the preamble of WWII, major conflicts that would afterwards be happenning in a global scale, clashed for the first time in the Iberian Peninsula. The fight for freedom against military fascists, the ideal to stablish a modern Republic, the insurgence of anarquists and the communist parties.
If all of those were’nt enough…
Religion also played a huge part, and of course, national identities. Mind you: spanish civil war started around summer of 1936 (lasted three years); back in 1934, the regional government of Catalonia had declared itself and independent state within the Republic of Spain, waking up all sorts of animosities.
Republicans lost the war. Fascism endured 40 years as a military dictatorship. During all those years, catalan’s own language and other ways of cultural expression (music, literature, etc.) were consistently reppressed by the central government.
There are clearly strong connections between the drive for Catalonia Independence and the Spanish Civil War, or even the following dictatorhsip, but these are not exclusive. On the contrary, I would say these same connections go further back, centuries back. The aim from an important part of catalan society to transfrom its regional government into a state, dates further back, and it’s a conflict that central powers in Spain haven’t been able to deal with peacefully.