Most of their electoral success during that time can be contributed to the worldwide depression that took hold in the late 1920s, its effect on the German, European and American economies, and how the Nazis successfully used that issue to gather and consolidate power and support.
The 1920s and early 30s were tumultuous times in Germany, and Hitler and his Nazis capitalized on the chaos to offer Germans a new direction, one of order, pride, nationalism, and stability, not to mention economic recovery. This was not a difficult message for ordinary Germans to want to believe in at that time.
What's more, the Nazis had their own police force, the SA (Sturmabteilung), also knows as the Brownshirts, who beat and bullied the Nazis political opponents. All of these reasons led Nazis success in elections, but the poor world economy was the most important factor.