Yes, and No. The U.S. is actually a Republic which is democratic (not to be confused with with the Democratic Party; a classic misnomer and oxymoron). The Electoral College provision was written as part of the US Constitution, Article II, Section 1, by the founding fathers. It was intended to bring equal representation of presidential candidates to the entire country vs. the most populated areas which would have far more knowledge of candidates than rural and outlying areas when the nation expanded over time.
Excellent video that explains how the Electoral Works, etc.