The totalitarian governments usually manage to get to power when the nation is in a bad situation, especially economically, as we can see in numerous examples throughout the history.
They promise the people that they will make the nation strong, that they will move aside all the ones that are doing damage to it, improve the economy, make all people be equal etc. All of those things seem logical and good in the eyes of the people that are desperate for a change and have been living in bad conditions, thus they would elect them. Once they get the power though, the totalitarian governments show their real face, they make a strong core around them, control the military and police forces and use them on daily basis for controlling things, use intimidation and violence, and the end result is that the people get stuck with similar or even worse leaders than previously.