Even if they do (by which I mean almost certainly will), that won't shut everything down, and Catalonia is fairly rich and powerful in the internal context. They will resist economically and politically and claim martyrdom- which many will agree with. They have a lot of backers in and outside of Spain.
The EU will take time to interfere- if Spain let's them- it will likely try to fix things on their own first. It, like many members states, wants concessions from the EU and won't want to surrender key sovereignties just yet. Appear weak. Secessionist movements additionally have a long history of successes and body counts in the Kingdom as well, plus Spain is something of a paper tiger militarily and in terms of unity. A lot of people in Spain, particularly secessionist regions, won't likely care if Catalonia leaves. Plus, a guerrilla war is always a possibility years down the road. Spain is bloody awful at those. They have worked in Western Europe before, too.
This situation will likely take months to resolve consider Spain's most important regional government is nearly unanimously in support of independence. But I don't actually predict bloodshed or a real war like so many alarmists. I just think Spain is going to end one way or another eventually and this is another sign of it weakening.
Even if they do fail, this could only be the beginning. Spain is very fragile as a union.