The ordinary understanding of the legitimacy of democratic governments is that their authority derives from a popular mandate; the government can legitimately impose laws on citizens because those citizens have the ability to replace the government if they choose.
The argument that popular consent makes the decisions of democratic governments legitimate is based on the assumption that the people impacted by those decisions are the citizens who are alive and voting.
Because greenhouse gas pollution endures for so long in the atmosphere, people for tens of thousands of years will be affected by the choices we make now. In particular, how much fossil fuel we collectively choose to burn during the next few decades will have a huge impact on the kind of world many future generations inhabit. We have a choice between passing on a world that largely resembles the one we inherited or passing on one that is radically transformed, largely in ways that are deeply harmful to the life prospects of future generations of human beings.
In this way, citizens and governments have entered into a conspiracy against future generations. Governments do not meaningfully restrict the use of fossil fuels. Indeed, they positively encourage it. This policy is popular because it facilitates many things that people value: from inexpensive domestic and foreign travel to cheap and uninterrupted electricity, air conditioning, winter heating, consumer goods, and all the conveniences and pleasures that exist in our energy-intensive lives. In order to maintain those lifestyles, we choose to burn vast quantities of fossil fuels.
The consequence is that many people with no political voice are made to suffer. This in turn undermines the moral legitimacy of the arrangement. The consent of the governed is a point in favour of democratic governments, but they must also be held accountable for the consequences of their actions on defenceless members of future generations who will suffer from the pollution we produce but who have no political voice.
These self-serving arguments from the world's petroleum brokers are based on a singular falsehood: that more energy translates into better living. Decades of human slavery peddled the same lies. Eighteenth-century Liverpool and Bristol slave traders contended that trafficking in human energy was "the best traffic the kingdom hath"; the world needed more slaves to end global drudgery and provide the necessities of life.
This is one reason to question whether consent of the governed is the only criterion of legitimacy. I am not saying that it is irrelevant, but I would put the pursuit of justice at the core of legitimacy, even if sometimes this pursuit is not immediately recognised by a majority of the people. In other words, I would not say that any non-democratic regime is ipso facto illegitimate.
What about a government that opposes the popular will in order to correct an injustice? For instance, by ending slavery or introducing carbon pricing?
One other note: the argument above rather deflates Stephen Harper's 'the voters have rejected a carbon tax' rhetoric.