The difference is that the Democratic party "rebased" itself. They've basically removed blue collar white people as a constituency that they focus on.
This created a problem, as the get out the vote efforts from groups like unions and others were tepid as a result, and the GOP isn't stupid and courted these voters pretty heavily. The other thing is that the Democrats over-relied on minority voters as a key base, which didn't work out for a variety of reasons.
I think strategically they missed the fact the ethnic voting requires an ethnic candidate. They also missed that certain key platform positions alienate ethnic factions of their voting base. In the old days, the Irish-Catholic political machines didn't run aging teetotaler baptists as candidates for a good reason!
Basically, Mrs. Clinton ran a campaign that was divided, disorganized and poorly administered, which crippled her ability to make appropriate decisions. Trump's opportunism, marketing savvy, and tight team made his campaign agile and tightly focused on the objective. When the campaign had internal divisions, he purged the dissenters and moved on.