The underlying problem, from way back, is that Spain's territorial model is ridiculous. The "comunidades" are not all equal. In particular the Pais Vasco and Navarra have different funding regimes than the rest - oversimplying a bit, the taxes levied on residents of these regions are given directly to their governments - whereas the taxes levied on other regions are remitted to the central government and then redistributed. In Navarra's case this is because of its "foros" - such an arrangement has a long (centuries) history. In the case of the Pais Vasco it goes back to the Franco era (!) and functionally was a way of ameliorating independentist sentiments. This system is terribly unfair in the sense that it treats certain regions differently than others, and is completely incompatible with any kind of socialist worldview ... Catalunya wants a similar funding regimen. At least that's where are lot of this originates at the political level. The richest regions in Spain are Pais Vasco, Catalunya, Madrid. Any sane model has monies redistributed to poorer regions like Andalucia and Extremadura, but to jingoist politicians in Catalunya this has long been cast as Madrid stealing from Catalunya to give to Andalucia. Never mind that something like a third of the population of Catalunya (including some of the most zealous independence supporters) has its roots in Andalucia ...
The linguistic factor is important too, but has gained importance in the last two decades with the introduction of predominantly Catalan schooling in Catalunya. A lot of the complaints made in Catalunya - that the roads are crap and the trains don't run on time - are just as applicable in Murcia or Almeria - but if one wants to see them as Madrid oppressing Catalunya, it's not hard to see them that way.
The other major factor in all this is all the corruption scandals that are plaguing Spain. There is nothing special about Catalunya in this regard (Murcia's former president is facing jail time, Madrid's former president is in jail, etc.) except that independence offers a utopian solution to the corruption problem. All of Spain wants independence from terrible corrupt governance (it's no more terrible or corrupt than in Germany or the US - actually things may be better because it's acknowledged and there is some effort to clean it up, unlike in the US).
The current mess is exacerbated by the low quality of the principal politicians in both the central government and the Catalan government. Rajoy is a coward and do nothing (think of US presidents in the 1880s) with no personality and less idea. Puigdemont, Junqueras and crew are the worst kind of opportunists - they are genuinely guys dreaming of being founding fathers of the great Catalan nation - and have little else going on in their heads. One of them (I can't remember who) actually compared himself to Mandela. Rajoy and the PP are two steps from the Franco heritage they have never repudiated and compounding their inability to take any positive action to address the obvious malcontent in Catalunya, the only reaction they can imagine is the most colorless uninspired statist response of calling out the judges, police, and the army if need be - if Rajoy had the culture to think of Lincoln (which he doesn't) he would be dreaming of being Lincoln in the US Civil War, defending the house united and all that jazz. Instead he's really using all this because he correctly judges that it wins him votes in Spain minus Catalunya and leaves the leftist parties (PSOE and Podemos) in a hard spot (they can't really defend a unilateral independence declaration, but they can't really defend massive police action, so they are just marginalized and quiet) politically speaking. For him it's a win-win situation (one of his people said this the other day).
It's a classic example of how politicians operating on the basis of strategy and ambition and lacking real quality take a solvable problem and turn it into a disaster.
The fear is that something violent will happen next weekend, and then no one really has any idea where this leads.
This image (not a joke) of the boat used to ferry police to Barcelona a few days ago sums the situation up: