It is quite easy to set a goal and fail at it. I know that for certain as I have done it many times. The point is not whether you fail during your attempt, but it is whether you quit along the way. Instead of quitting, get yourself back up and keep on pushing onward. It is definitely easier to quit, but you will get success, of some kind, if you refuse to quit!
Some goals should be abandoned if you realize they are not worth achieving, but only do that with a conscious thought, not just because things are hard. Make sure your goals are good ones. If they are, never quit!