"National pre-election polls in 2016 indicated that Hillary Clinton would win the national popular vote by a 3-point margin, and in fact she won by 2 points. The major problem was with state-level polls, many of which missed a late swing to Trump among undecided voters and did not correct for the fact that their responding samples contained proportionally too many college-educated voters (who were more likely to favor Clinton). A silver lining is that both of these problems can be overcome, to some extent, by more rigorous survey weighting and heightened attention to the possibility of late shifts in voter preferences.
It’s also important to remember that election polls are just one kind of poll, and that they’re not the best barometer for the accuracy of polling in general. Why not? Because an election poll has an extra hurdle to jump: It not only has to measure public opinion, it also has to predict which of the people interviewed are going to vote and how they will vote – a notoriously difficult task."