More broadly than that -- it's not that you need to pay everyone the same, it's that you need clear structure around how your pay works.
An example that became a problem with one previous employer was that they kept saying "performance" was their only determining factor for pay, after it had come out that exactly one person on our team had been offered bonuses as a performance incentive.
It's not actually performance-based if you have different and better reward structures, or if you can't/won't explain why gaps exist.