https://projects.fivethirtyeight.com/2016-election-forecast/...
The last poll there from Nov 8 showed Clinton winning the popular vote by...wait for it...3.9 percent. She won the popular vote by...2.9 percent. National polls weren't far off at all.
The electoral college was decided by less than 50,000 votes overall. No one predicted the margins in those key states would be so small. It was a razor-thin win.
Statistics always have a margin of error and give probabilities. Polls didn't have to predict Trump winning. Instead, they give a probability of winning. FiveThirtyEight predicted a 28% chance of winning[2]. That's based on Monte Carlo simulations (that's where they run, e.g. 100 random elections and count how many times each outcome occurred). It actually doesn't matter if that estimate was low; it was high enough (1 in 4 chance) that the outcome wasn't insane. Even three days after the election, they already had an analysis of what they went wrong with polling[1]. I mean, you could read that or continue to trot out tired polarized arguments.
[1] https://fivethirtyeight.com/features/why-fivethirtyeight-gav... [2] https://projects.fivethirtyeight.com/2016-election-forecast/