Meritocracy means that those who deserve to, succeed, and those who succeed are those who deserve to. What could possibly be fairer than that? While it seems easy to agree that a functioning and successful society should endorse meritocracy to some extent, a society based on merit alone would not only be impossible to achieve - it's a conception of ideal justice after all - but also likely become more awful the more it resembled that ideal.
What is a meritocracy? It would seem to require the interaction of 3 distinct components - personal endowments (such as native intelligence, rude health, social opportunities, etc); personal moral character (those virtues such as self-discipline, effort, ambition that we want to 'reward'); and a socio-economic structure that reflects some agreed standards of merit so that people who do 'good work' (scientists and doctors, perhaps?) are encouraged and rewarded.
Note immediately that these components are harder to separate than one would like. Personal endowments are always conflated with individual virtues: you can't do good work just by good intentions - you also have to have the position and resources (including resources provided by others such as their education, honesty, and active assistance) to act effectively. That is why John Rawls, the giant of 20th Century political philosophy, definitively rejected distribution on the basis of personal merit in his Theory of Justice.
Nor can objective standards be identified completely independently from social norms, for two reasons. Firstly, in the absence of a perfect moral theory, society can only vaguely agree on what counts as meritorious: individuals' own rankings of deserving success will likely be incomplete and different from each other, and society's aggregate valuation will then necessarily be limited to the areas of intersection. (Further agreement would have to be political, perhaps ideally with some kind of public reasoning and decision procedure, but that would still be incomplete.) So 'objectivity' must be replaced by partial inter-subjective agreement even on such basic issues as whether fairness or efficiency are most important. Secondly, any socio-economic structure must have at least one other goal besides rewarding merit - sustaining and reproducing itself. And this will lead to inefficiencies (or 'injustices', since they are deviations from ideal meritocracy).
Some (controversial) solutions.
1) Those concerned with fairness often try to separate moral character from personal endowments by emphasising the equalisation of 'natural luck': everyone should have a level playing field to start with in that talents and opportunities must be equally, or at least equally randomly distributed if we are to claim that individuals deserve any credit for their achievements (i.e. for their effort, not their luck). But note that this vision of a meritocratic society would exhibit no fixed pattern in achievement, since it requires quite redistributive state policies: taking away some of the 'just' rewards of the successful to protect, at the least, the equality of opportunity of future generations by giving children the resources for an equal chance at succeeding in life.
Those concerned with efficiency argue that the point of meritocracy is not to give everyone the chance
to be good, but to maximise the total amount of good work that gets done. They claim that the definition of merit should therefore be based on relative productivity, so that to those who are best able to convert resources into wealth, more should be given. And to those who are least able to generate wealth, for example due to disability or poorer education, even less should be given.
2) Market capitalism is sometimes proposed as a solution to the social valuation and sustainability problems: what counts as merit and what kind of reward (and how much) it should get. The idea is that free markets naturally produce supply and demand equilibria at prices that reflect society's (aggregate) demand for, say teachers and vets, and we can read off the right answer about how important things are to society according to its members' willingness to buy them. No perfect and universally accepted moral theory is required! But this seems problematic:-
i) markets often show demand for non-socially beneficial things (like twinkies or pornography) which we don't normally want to say are 'meritorious';
ii) many valuable things are not traded in the market, but we'd still want them rewarded (like parents' care for their children);
iii) in any case there is no such thing as 'the market' outside specific and contingent socio-institutional settings, there is only a disembodied 'logic of the market': self-interested prudence. The extent to which economically efficient individual prudence will coincide with or lead to the morally efficient outcome of meritocracy depends on how the economic structures we have, or choose to have, channel that prudence;
iv) assigning marginal value to an individual's marginal productivity is difficult for goods produced by teams (e.g. within firms and institutions). If a group of people put on blue shirts and beat another group at basketball, which one of them won the game and should get the reward?
v) defining merit merely as economic success, even if possible, seems to miss the point. It's like defining 'fitness' with the pat phrase, 'survival of the fittest' and then pointing to the ones that survive. But that simply reduces 'fitness' to survival and begs the question, why should fitness be defined that way?
Markets therefore offer no real escape from the problem of moral evaluation of what and how society should reward.
So a pure meritocracy doesn't seem possible. But the ideal of meritocracy can still cause harm, if taken beyond such unarguable principles as giving a job to the most qualified person (other things, including the fairness of the interview process, being equal). Meritocracy goes wrong because it stretches morality beyond its limits either by trying to change the world to fit a theory (crazy), or by assuming that the world is already perfectly meritocratic (stupid). In the former, a single moral theory is politically imposed on a whole society, which is always accompanied by a decreased respect for individual moral responsibility (see Communist Cuba and the Islamic Republic of Iran for object examples). In the latter, people may believe that a society is in fact meritocratic despite its impossibility (as in an extreme version of the 'American Dream'), so that losers will see themselves (and be seen as) thoroughly deserving of their moral failure; while the successful refuse to help because they believe the meritocratic society's perfect functioning already answers all moral claims, and since they thoroughly deserve everything they have, why should they give any of it up to the undeserving?
All in all a society fully committed to meritocracy seems a thoroughly unpleasant prospect. It conceives of society as a race, not as our shared home. I much prefer what I call 'mediocracy', in which we all muddle along trying to do our best, a best that includes helping those who can't run as fast or who trip up along the way.