The phenomenon you describe is known as compression and, in the case where salaries are actually reversed, inversion. Unfortunately these are very common especially at state universities. The principal cause is that faculty get hired as assistant professors at market rates, but the university salary structure fails to keep up with inflation and any other sources of increases. Given the severe funding cuts, salary freezes, and so forth that have plagued public higher education over the past few decades, this situation has been almost inevitable. The result is a salary structure such as you describe.
The only ways to fix this are either explicit allocation of funds to correct compression, or for individual faculty to obtain raises via retention packages to fight off outside offers.
In general, salaries are basically set by market rate at hiring (which for assistant professors is largely independent of citations and papers, conditional on getting the job in the first place) and by outside offers received later during the career. Both the availability of outside offers and their magnitude will depend on stature in the field. Even if one does not actually take an outside offer, receiving one or more such offers can prompt the home institution to put together a retention package. The willingness of the home institution to put together a top package will also depend on stature, and similarly the magnitude of the retention package depends on the outside offer and is thus also based on stature.
In principle, regular merit raises could also reward faculty in accordance with their productivity and impact. But for whatever reason (I blame self-governance, but that's another discussion), merit raises and such tend to be allocated in relatively egalitarian form, rather than proportional to differential merit and productivity.
Other answers provide additional important information. Some salaries are 9 month, some 12 month. Some faculty on 9 month appointments can cover summer salary off of grants; others spread 9 months salary across 12 months. Public databases often list total salary received rather than 9 month salary; this considerably increases the variation among faculty.