I think it was a combination of the deplorables comment, and running a victory lap instead of a campaign.
If she had paid even a little attention to Wisconsin, Pennsylvania, etc., instead of taking the 'blue wall' for granted, she would have easily won.