The U.S. Constitution changed all this by massively shifting power from the States to the government of the United States. It did this in great measure by strengthening the powers of Congress. But it was also a serious concern of the Founders -- most notably Alexander Hamilton -- to create a 'more energetic magistrate', i.e., an executive branch of government. The question, of course, arises: Given that this Presidency is new, and needs to be sharply distinguished from Congress, how should the President be chosen? If you look at the defenses of the Electoral College, e.g. Hamilton's famous defense in The Federalist #68, you find that this background runs throughout the argument. The reason they had the President of the United States elected by an Electoral College was to increase the say of the people in the federal government, by removing the power to choose the presiding magistrate of the Union of States from Congress and creating a new Presidential office elected by a body that was not pre-established in the way Congress was. Thus Hamilton explicitly gives as an argument for the Electoral College the point that 'the sense of the people' should operate in choosing such an important figure as the President under the new Constitution. This it did by removing the electoral power from Congress and putting it into the hands of a body of citizens chosen by voters for that very purpose.
It is true, however, that Hamilton sees the Electoral College as putting a check on faction -- but, far from being an attack on mob rule, this seems to have been seen chiefly as a way to increase the representativeness of the election. The people have more of a say if there are several people directly elected than if there is only one: thus, having the people elect the several representatives in the EC increases the say of the people by reducing the pressure that would be created by various factions trying to elect one person only. (Incidentally, this ties in with another common mistake about the EC, namely, thinking that the votes of the people serve no function but to suggest how the electors vote. In fact, that's not quite true. The votes of the people actually elect the electors according to the method established by the state legislature. And most of people's complaints about the EC turn out to be really just complaints about the method of election established by the legislature of their State.)
So the Electoral College should be seen as what it was claimed to be: an attempt to increase the power of the people by taking the authority to choose the presiding officer of the Union out of the hands of a pre-established body, like the United States in Congress Assembled, and putting it into the hands of a body chosen by the people for the very purpose of choosing the President; and an intermediate body of electors was chosen not for the purpose of limiting the power of the people, but for the purpose of increasing the degree to which all the different factions or parties could have their say. As I've said before on the subject: The Electoral College was created to increase the power of the people by giving them an orderly, simple way to guide and control who was chosen to preside over the Union. This is the explicit justification put forward by Hamilton; any other supposed justification is either imaginary or needs to be defended by evidence. Of course, it's another question whether the EC actually does what the justification says it does.
And it's probably not surprising that the complaints about the Electoral College have been with us from the beginning. From the Antifederalist no. 72:
Is it then become necessary, that a free people should first resign their right of suffrage into other hands besides their own, and then, secondly, that they to whom they resign it should be compelled to choose men, whose persons, characters, manners, or principles they know nothing of? ...Is it necessary, is it rational, that the sacred rights of mankind should thus dwindle down to Electors of electors, and those again electors of other electors? This seems to be degrading them even below the prophetical curse denounced by the good old patriarch, on the offspring of his degenerate son: "servant of servants".
But, of course, the complaint was really a complaint about the unprecedented amount of power that the new Constitution had invested in the office of the President by giving it such independence from Congress and the judiciary, not about the means of electing the President. And perhaps it is so in this case as well.