As people have already said, there's many reasons. But I think of the run up to his taking power, the biggest factors were Hindenburg and Von Papen underestimating Hitler.
There were strong reasons to predict that civil war was imminent in the weeks leading up to Hitler being appointed Chancellor and the outing of Schlicher
(spelling?) meant that a strong Chancellor was needed. As much as he disliked Hitler, Hindenburg chose to appoint him after being advised to by Von Papen (who had made a pact with Hitler to make himself Vice Chancellor) and the fact Hitler was a strong politician, whatever Hindenburg thought about him personally.
Once in office Hindenburg tried to control Hitler by keeping the cabinet as Nazi free as possible, there were only 2 or 3 Nazis in the cabinet initially.
If you look at the seat numbers in the Reichstag, the Nazis numbers had actually begun to drop when Hitler came to office as the economy began to stabilise again after the Wall Street Crash. The Nazis were actually surprised when Hitler got the appointment and thought they had already missed their one opportunity.
While the Treaty and depression were great factors, one of the biggest reasons I'd argue was that Hitler took power through good ol' fashion back door scheming.