Many people ask about this “saying.” Most of these ask where to find it in the Bible; you are the first to ask me about its meaning.
The only problem is that this “saying” is not in the Bible. The first part of your quotation comes from Ecclesiastes 9:11.
I have seen something else under the sun: The race is not to the swift or the battle to the strong, nor does food come to the wise or wealth to the brilliant or favor to the learned; but time and chance happen to them all.
The final part might come from Hebrews 3:14.
We have come to share in Christ if we hold firmly till the end the confidence we had at first.
Many times we conflate two passages of Scripture in our minds – and come up with something that is no where actually said in the Bible.
The idea of enduring until death is found in a number of passages, though that is not what is in mind in Ecclesiastes 9:11. There the wise man is talking about the uncertainty of life. It is not always the best, the strongest, or the fastest who reap rewards in this life.
Holding out in a race is one of the key thoughts of 2 Timothy 4:7.
I have fought the good fight, I have finished the race, I have kept the faith.” Enduring to the end is an important Biblical concept. “Do not be afraid of what you are about to suffer. I tell you, the devil will put some of you in prison to test you, and you will suffer persecution for ten days. Be faithful, even to the point of death, and I will give you the crown of life” (Revelation 2:10).
The idea here is that we do not allow anything, even the threat of death or suffering, deter us from our faithfulness to God.
So, the thought of your quotation is Biblical – though the particular wording is not.