Each state receives electoral votes equal to the size of its Congressional delegation, which is adjusted after each Census. Since all state have two Senators, smaller states are over-represented in the Electoral College.
This interactive map shows the number of electoral votes each state would have if only Census population was considered and applies it to the 2016 presidential election. It may seem surprising that the result is little different than the actual 306-232 result (excluding faithless) given that Clinton won the popular vote. However, there is a second factor at work, which is margin of victory. Clinton won larger states like CA and NY by much bigger margins than Trump won states like TX and FL. Since electoral votes are winner take all, those extra popular votes provide no benefit.