I've looked at this sentence multiple times now, and while I agree that it's a little strange, I can find nothing in it that's either syntactically incorrect or problematic when it comes to the tenses used.
I will take the essential part of the sentence that seems to be causing a problem and and look at it separately.
It's possible you gain confidence to do greater things through failures.
Focusing only on the start of this sentence for now, this construction is no different to me than any of the following sentences:
It's possible you gain strength by eating spinach.
It's possible your mistakes will come back to haunt you.
It's possible you gain wisdom through failure.
It's possibly fatty foods don't affect you the same way they do other people.
The only real difference I can see between those sentences and the one in question, is that the one in question has a little bit more added to it and also ends in a slightly odd way. But this oddness comes at the end of the sentence, not at the start.
If I were to rephrase the sentence in question to make it a little more idiomatic, I might put it his way:
It's possible you gain the confidence to do greater things because of your failures.
If any oddness remains, it's simply because of some context that may or may not be needed. Additional context might have the sentence become something a bit more descriptive:
It's possible you gain the confidence to do even greater things because of your failures when first attempting the routine.
However, while this might things more easily understandable, it's not required in order to make the sentence grammatical.
Further, I might rephrase the larger sentence in a similar way:
Doing this can hurt you in the long run, but it's also possible you gain the confidence to do greater things because of your failures; therefore, it's not 100% clear how good or bad this action is for you in the long run.
These are all syntactical changes in different areas—but not changes to the it's also possible you part.