The advice to start writing something else is useful to keep in mind, but be careful it doesn't become a habit - it is easy for moving on to something else to become a default reaction and you end up never getting anything finished.
A long while ago I started this thread about
Susan Sontag. That thread has a link to an interesting article, but also a quote in which she says that
the problem is the solution.
I have found that aphorism is very useful to remember. It may be that you won't really understand it until it has happened to you in a big way (I think it happens quite often in little ways that we don't always notice), but once you do understand it, it gives you another way to think about the difficulties you are facing.
In my published fantasy trilogy I wanted four siblings to have special powers, and I had three of them worked out in detail. Each of those three had power that suited their individual personalities very well, and was manifested in a particular way that fit the logic of the story. But the fourth? I fumbled around that for a very long time, and it really seemed like I had written myself into a corner. She was such a meek little thing, how was she to carry a super power? And I wanted her to play a key role, it had to be a good power, and at least part of it had to be a secret from her siblings (which, given what I had already set up seemed impossible). ... But when I found the answer (I was in the shower at the time and almost started singing for joy

), I was amazed to see that it all fitted together perfectly - right up to how the trilogy would end.
It would be difficult to explain the solution without making this post really long, but it is enough to say that the power she had is part of what made her meek, it was part of what made secrecy possible, and it was part of what made the ending possible. (Even the background material made more sense under this solution.) It really was a case that what I had been thinking of as problems were actually part the solution - part of what made it all work - I just had to look at all the problems in the right way.
...
Of course, it does have to be faced, sometimes what we've written really is crap and the best thing that can be done is to throw great chunks away. (I don't talk about those.

)
But before you do that, consider whether the apparent problems are what actually makes the the story interesting and different. (In my case it was the dichotomy of the fourth sibling that made her the most interesting.) If every problem in a story had an easy solution then books would be boring, so the fact that we writers sometimes hit seemingly insoluble situations is a good thing! It means we're doing something right, and the rest of doing it right is to find the solution, to make the impossible possible. Nothing to it.