This is called doing the unexpected, and it is an essential part for a successful and exciting book. My own novel has plenty of obstacles and the like (see previous post), but my character acheives his goal easily enough. I need to go back through and do the unexpected.
How would I find something that is totally unexpected? Take a look at the plot of a novel. What would happen that would be totally unbelievable, something that would leave a reader wondering, I can't believe that just happened. Found it? Do it. Yes, even if it's painful. If it is too severe, than tune it down a bit, but do it.Everytime something unexpected happens in a book I'm reading, it throws the end in shadow. Will the goal really be acheived? I wonder.
Most of the time, you want the goal to be acheived. But since your reader is probably expecting the story goal to be acheived, get to the story goal in a way that is unexpected.