Paul Krugman has a blog post called "What do Trump voters want"? The obvious answer for most of them was a Republican president, but Krugman was concerned with the working-class voters who shifted from voting Democratic in previous elections. He concluded that "I don’t think any kind of economic analysis can explain this. It has to be about culture and, as always, race." His reasoning was that these voters were going against their economic interests, since they benefited from government spending that Trump was likely to cut.
I think he's giving up on economic analysis too quickly. As John Stuart Mill said, people "never . . . save in very exceptional cases . . . direct their conduct by their real ultimate interest, in opposition to their immediate and apparent interest." Trump could appeal to an "immediate and apparent interest"--protecting American jobs. A professional economist would say that restricting trade wasn't in the "real ultimate interest" of Americans generally, but many people, especially people with less education, aren't convinced by or even aware of the arguments for free trade. Also, not everyone gains--the benefits are spread widely, in the form of lower prices, while the costs are concentrated on the workers who are most exposed to foreign competition--that is, on factory workers, or people who would like to get a factory job instead of a poorly paid service job. In principle, the government could increase taxes enough to compensate the "losers" and leave everyone better off, but no one is foolish enough to imagine that will actually happen. So it's understandable that Trump's promise of "America First" and rejection of trade deals appealed to less educated voters, especially since the Clinton campaign didn't make much effort to reply to it. As Mill said, "protection of the home producer against foreign industry" is one of the "very natural . . . results of a feeling of class interest in a governing majority of manual laborers."
I don't have any direct evidence for this interpretation, but we can look at the pattern of state differences. The states in which Trump did well were pretty much the same as those in which Romney did well in 2012 (see the figure), but there were some differences.
Trump's biggest gains over Romney were in North Dakota, West Virginia, Iowa, South Dakota, and Maine. Those states are all overwhelmingly white. You could argue that means that the changes really were about race--people are more afraid of the "other" when they hadn't had much exposure to diversity. But there's a long tradition, which has empirical support, holding that race is more important to white voters in places that are more racially diverse. For example, when people talked about "Reagan Democrats" in 1980 they meant white working-class voters in places like the New York, Philadelphia, and Detroit metropolitan areas (see this paper).
Although the states that shifted to Trump are all rural and overwhelmingly white, their economic situations vary widely. West Virginia has one of the highest unemployment rates of all states, while the Dakotas are among the lowest. The same is true for rates of disability. One thing I think that they have in common, although I can't find any clear data, is the importance of extractive industries--lumber in Maine, and energy in the others (coal in West Virginia, the Keystone pipeline in the Dakotas, and ethanol production in Iowa). It seems like the "immediate and apparent" interest of people in those states aligned with Trump.