A government wouldn't be legitimate if there is no consent of the governed and it can only be achieved through majority rule.
To have legitimacy in a government means that the government must have the majority of acceptance of authority from its citizens. Without this basic condition, a government collapses.
Democracy is an example of this because the government is legitimated from consent by the majority of the citizens.
In addition, there are four types of legitimate government: Communism, Constitutionalism, Democracy, Monarchy, and Fascism.