Ideally in a fair world, this shouldn't happen but reality is, it happens very often. In my previous role, I joined as a fresher in a large IT services company. I come from Tier 2 MBA college, so imagine my surprise when I found out my friends from Tier 1 college were being paid 2 times my salary for the same amount of work.
It is the premium companies pay for hiring from Tier 1 MBA colleges. I thought by working hard, developing skillet, I will narrow the gap between me and my Tier 1 friends.
I spoke to my managers about the disparity, they understood my situation, gave me good hikes but it ultimately didn't result into anything significant.
I did get promotion faster than them, better hikes than them but couldn't close the gap simply because of the base effect. Even though my %age hike was higher, but because base salary is low, it didn't result into anything significant.
So my suggestion would be, if your current company doesn't value you enough, time to jump the ship. No other option