It's an interesting fact that, despite modern angst, the Electoral College was one of the least controversial parts of the Constitution during the ratification debates. Writing in Federalist essay No. 68, Alexander Hamilton points this out.
The mode of appointment of the Chief Magistrate of the United States is almost the only part of the system, of any consequence, which has escaped without severe censure or which has received the slightest mark of approbation from its opponents. The most plausible of these, who has appeared in print, has even deigned to admit that the election of the President is pretty well guarded. I venture somewhat further, and hesitate not to affirm that if the manner of it be not perfect, it is at least excellent. It unites in an eminent degree all the advantages the union of which was to be desired.
Of course, the Electoral College did not end up working exactly as the Framers of the Constitution thought it would. They assumed that once states elected or appointed their Presidential Electors, those Electors would meet and actually deliberate before deciding and voting. This is one area where the American Founders were a little shortsighted about human nature. Whether it was legislators appointing Electors, or voters electing them, people wanted the power for themselves--in this case, the power to direct, or at least know, how the Electors would vote. And from the very beginning, it has basically worked that way. Nobody sits around wondering how the Electors will vote; we make sure to know that before choosing them.
Far from being a flaw in the system, this makes the Electoral College work even better than the American Founders thought it would. Rather than often deadlocking and throwing the election to the House of Representatives, there is almost always an electoral vote majority (the magic 270+). And yet the system still contains the election within individual states, keeping power at the state level and recognizing states as the building blocks of our federal system.