The dilemma is that there are three answers to that question, each valid in its own way...
Jesus addressed this option in a construction analogy about building a tower. He suggested that if it does not appear that you will be able to complete the project, you would be better off never even starting. Therefore, an investment of forethought and preparation in the early stages is essential to your eventual success.
"For which of you, intending to build a tower, sitteth not down first, and counteth the cost, whether he have sufficient to finish it? Lest haply, after he hath laid the foundation, and is not able to finish it, all that behold it begin to mock him, Saying, This man began to build, and was not able to finish." (Luke 14:28-30, KJV)
Unfortunately, many people select this first option too quickly. For them, it is not so much an issue of not being able to pay the cost as it is not being willing to do so. There may be some truth to the axiom that "all good things come to an end," but there is no need for that "end" to come prematurely. In almost every situation, you have other options.
Your second choice is to keep pressing on. Sometimes, a little perseverance, persistence, and patience are required if you hope to experience success. Acquiring the necessary building permits, for example, can sometimes take a few extra phone calls. Weather conditions can delay progress, but eventually the weather will improve. In these cases, you simply need to continue pressing on toward your goal. In due course, you will experience a breakthrough.
Perseverance can enable you to overcome discouragement, inconvenience, and opposition. This is true in life; it is also true in terms of faith:
"Brethren, I count not myself to have apprehended: but this one thing I do, forgetting those things which are behind, and reaching forth unto those things which are before, I press toward the mark for the prize of the high calling of God in Christ Jesus." (Philippians 3:13-14, KJV)
Third—and perhaps your best option the majority of the time—you can change your strategy. It has been said that the definition of insanity is doing the same things the same way and expecting different results. Achieving your desired results may mean doing different things and adjusting your tactics.
If you are attempting to fix a leaky faucet in your home but the problem only seems to be getting worse, it may be time to call in reinforcements. This is not quitting; it is choosing to address the problem a different way. If your marriage is failing, a professional counselor can help you discover new relational skills and techniques that restore your marriage to health. This is possible, assuming you exhibit the openness and willingness to change.
In chapter three of Women Under Construction, I describe how the work of a surveyor at a building site can provide calibration, define boundaries, identify problems, and suggest alternatives. This is the role Scripture can perform in your life. The Bible can enable you to calibrate your life according to God's Word, define the boundaries of His Will, identify problem areas (i.e. sin) in your life, and empower you to be changed by His Presence.
On occasion, giving up on a particular task can be a valid option, particularly when there is no hope of success. In most cases, however, especially in relationships, life, and faith, giving up is the worst option you could make. You would be wiser, happier, and more successful if you were to press on, making the necessary adjustments along the way.