I agree with @GOATNine's core premise, but I would like to add additional experience and perspective.
Aside from leaving or getting a direct promotion, your company may also offer performance-based raises, in which case you can also catch up to or pass your peer's "lead" by doing work that's more highly regarded (because it is directly more valuable, or you are more innovative, etc). This is related to GoatNine's recommendation about professional development, but is more focused on achieving results rather than improving your credentials.
I can say my first-hand experience with this has been very positive. In my current employment, I didn't negotiate starting salary well and later discovered that my salary was well below peers. I went out of my way to demonstrate value, however, and within a couple years I was in a higher pay bracket than peers and not long after that I got significant promotions as well.
To me, it's mostly a difference in perspective. Do you want to spend your time showing that you're more well-trained / well-educated, or do you want to spend your time showing that you have real value to the company?
If you ever choose to leave, I will say that (now that I've been a hiring manager also) most companies will care more about a track record for high-impact project work than they will about additional education or training notes.