“Somehow the Clintons did not remember,” he said. “It was a blind spot.” Mr. Thiel said that against Senator Bernie Sanders, who competed against Mrs. Clinton for the Democratic nomination, it “would have been much tougher for Trump to win, and a healthier race for the country. It would have been two candidates who agreed about the country’s stagnation but had very different policy prescriptions.”

One of the supposed rules of American presidential politics is that the candidates must be upbeat — a decree ever since Ronald Reagan trounced Walter Mondale in 1984 with the slogan “It’s morning again in America.”

Mr. Thiel said he sensed this year that the rule would not hold.

“I’ve thought for quite a long time that the happy clappy Panglossian Republican politics that we had over the last few decades was deeply out of touch,” he said. “In some ways, a more pessimistic candidate would do better, because they would resonate with these broad economic realities.”

Even as Mr. Thiel’s bet on Mr. Trump was proved right, many in Silicon Valley’s tech industry on Wednesday reacted negatively to the presidential victor. Some venture capitalists floated the idea of a California secession.

The tech community was heavily invested in Mr. Trump’s defeat, not so much because it loved the prospect of Mrs. Clinton but because the Republican stood for so much it abhorred. For a community struggling with diversity and often criticized for its treatment of women, a candidate who boasted about his groping was someone to be shunned. On policy grounds, the industry’s embrace of free trade and immigration was exactly the opposite of Mr. Trump’s.

Mr. Thiel had a different view. In interviews and a widely publicized speech at the National Press Club in Washington on Halloween, he argued that voters should look beyond Mr. Trump’s personal failings and wild statements and focus on the need to revamp a system that was enriching the coastal elites but alienating many others.

The investor said Silicon Valley was not completely opposed to Mr. Trump; there was also some secret support.