We *almost* ran into this problem once. We were about to extend a job offer which would have put this into situation, but my very wise boss jumped in and raised this scenario to explain why this must be avoided. I have seen situations where the old guard was paid less than new hires because the job market had tightened; the pay gaps were nowhere near as large as in this example, but there was still resentment.
I’m not sure how to best resolve this. If the issue is that some people are being paid less than a fair market rate, then it’s pretty reasonable to suggest that the company work to increase salaries to avoid attrition. But if the issue is that a handful of people are being paid significantly more than the market rate (and their peers), then you’ve really screwed up. I’m not sure what else you can do than be transparent to the unfairly impacted employees that you screwed up, explain how salaries should have been set, and see if there are any other ways (beyond salary) to make them feel like you’re trying to make it right, such as sending them to a significant tech conference, or letting them take an extra week off. I’m just thinking out loud here… what do you think?