We often think that the success is achieving our goals, but it's not only about that.
There are many successful people still didn't get where they wanted. But they keep trying and doing their best to get there. They may never reach that, but the fact that they are still trying and close, make them successful people.
We frequently face obstacles in our ways and here we have two different decisions, or to keep it up no matter what or to give up on that. If we keep working on that and bypass those obstacles, we have the chance to succeed. But if we give up on everything and don't even try to solve the problems and just run away, that will never make us successful.
Of course there are situations where no matter what we do, we can't get what we want. But that really worth to try to get there because we learn from our journey. So, the experience can be obtained only by trying hard. That's how we can be successful in not giving up, and we'll have more chance to get there.
So, to be successful, all we have to do is to keep trying.
If we can't be successful in one direction, we can be successful in another.
Just like you said, it is true. One should never give up trying. Success is not final, it is constant trying to achieve something that you want.