I don't really agree with Trump as the answer, because a generic Republican probably would have done better (Trump's totals, plus 75% of Gary Johnson's numbers.) The Republican establishment did back Trump once he became the nominee, so that is a factor.
The overwhelming majority of the vote was already settled, so that's a major factor (at least 40% of the voters will vote Republican.) The political environment wasn't great for Hillary, running to keep the White House for the third term for her party.
I'd put the blame on Hillary and Obama.
Hillary made severe tactical errors, and never articulated a message for her campaign. The email controversy came from an effort to skirt government accountability laws, and she took way too long to offer an apology. Her focus on minorities and boutique liberal causes in the primary convinced working class white voters (who faced declining life expectancies, which doesn't happen a lot in the civilized world) that she wasn't offering a solution to their problems. Her staff was in disarray, and they didn't feel comfortable criticizing her.
Obama appointed Debbie Wasserman-Schultz as head of the DNC. He didn't really care all that much about the DNC, which came back to bite the party in the ass, when they weren't able to use resources effectively.
I don't really agree with that. I believe Trump's appeal was unique and allowed him to be more electable than a generic Republican