Campaigns, like any creative work - and whether you realize it or not, every campaign is a creative work - sometimes don't pan out the way we expect. Sometimes the idea doesn't carry through, or doesn't have the depth we thought it did. Sometimes the differing views of what could and should happen bring us to an impasse. Sometimes games go bad, even when everyone involved in the game has successfully worked together to make fun and interesting campaigns multiple times before.
If you think this is happening to a campaign you are running, it can suck. The thing to remember is that likely it is nobodies fault. Yes, small bits and pieces may be able to be blamed. Someone maybe didn't make a character that fits in with what the group discussed. You didn't communicate a point clearly leading to a misunderstanding. Often times though, it is just something that happens. A character goes a different way than expected, or planned for. Or there is just a place where in this game, at this time, with these people, you don't all see eye to eye on what is fun and what people want.
It happens. It is ok. No one should be forced to continue playing a game that is no longer fun for them. That is true for individual players. That is also true for the GM - who believe it or not is also a player. And if you think you see the signs of a campaign going wrong, it is important to pay attention to that. There is little worse for the fun of the hobby - or the fun of the game - than a GM feeling forced to prep and run a game that they neither like nor are having fun in.
That said, if you see the early signs of a game going that way don't count the game dead just yet. Noticing early is good. When you notice something early, you can take measures to fix it. Ask yourself what is it about the game that is making things unfun for you? What is it that is causing the struggle?
If the PCs are going contrary to expectations, and taking things in directions you are not prepared for or wanting to go, that should be discussed with the PCs. They aren't going to know there is a problem - or that they are doing something that makes the game worse for you - if you don't tell them.
If, instead of being the whole group, just one PC is acting this way, or not engaging and that is making you worried, then you can speak to that player and ask them what is going on and share your concerns.
If it is just a general feel for how the game is going...by all means, shake it up. Do something in the game you think will be fun, and have fun with it. If it is a big departure from expectations and norms in the game, discuss it with your PCs first. If it is just you're having problems with a current plot...well, a different - more fun for you - plot can always waltz in and take over.
Nothing says your Space Opera game can't suddenly shift away from the irksome political scenes with the arrival of an enemy armada bombarding the planet. There's no reason that your investigate the mystery in the town can't suddenly have a large tribe of raiders show up to assault the town.
Games are meant to be fun. So have fun. And if you aren't having fun, and you can't have fun with that game without making it unfun for other people...consider it may be time to find a new game. Just don't count the game dead until you're sure.