Seems to me the bigger challenge is how to PREVENT someone from doing this. We've seen it happen over and over again in history, from Julius Caesar to Adolf Hitler to, etc.
How to do it? Several things come to mind.
One: Incrementalism. You don't just announce, the day after you won the election with 51% of the vote, that you are abolishing the constitution, declaring yourself dictator for life, sentencing all political opponents to prison camps, etc. Rather, you take small steps. You roll back one right here and impose one new restriction there. Then people grumble about the lost freedom, but no one action is big enough to trigger massive protests or armed rebellion. Until it's too late.
Two: Don't admit that you are making yourself dictator. Explain that of course you believe in all these important rights and freedoms, you are not taking them away, you have no intention of taking them away, you are just imposing some common-sense restrictions to prevent the abuse of these freedoms.
Three: When you expand your power, do it on an issue where a lot of people in the country agree with you. Don't violate the constitution to ram through a policy that 90% of the country think is a bad idea. Do it on something where a majority agree with you, or at least a strong minority. Then when opponents challenge your power grab, you can confuse the issue by talking about how they are trying to block this popular policy, and divert attention from your power grab.
Four: Alternative to number three, grab power using issues that no one cares about, and then next time around you can use this as a precedent. Little known fact: Nowhere does the U.S. Constitution give the Supreme Court the authority to strike down a law as "unconstitutional". Indeed this idea was proposed at the constitutional convention and voted down. The court simply decided it must have power in the case of Marbury v Madison in 1803. And the case they picked to expand their power: what paperwork is required for someone to become a justice of the peace in Washington DC. I doubt many people cared about the outcome of this case other than the handful of people who had been appointed justice of the peace and whose jobs were now in jeopardy.
Five: Never say that you want to make yourself dictator because you are power hungry or want to feed your own ego. Everything you do is always for the good of the people. You just have no choice but to defy the legislature: you tried to get them to pass this vitally needed law, and they refused. You had to take action or all these terrible things would happen.
Six: Demonize your political opponents. Whenever someone challenges your power grabs, accuse him of evil motives. He's opposing you to protect his own power, out of pure partisanship, because he's a racist or a Nazi or whatever insult works in your societey, he wants to oppress and exploit the people and you're trying to protect the people from folks like him, etc.
Seven: Find ways to prevent your opponents from organizing against you. For example, push through campaign finance laws that are carefully constructed to make it difficult for opponents to raise money, while interfering only minimally with you. Of course you never say that the goal is to handicap your opponents, it's always to "fight corruption" and "make the system more fair for everyone" and the like. Stack the organizations that enforce the law with your partisans. Then when your friends break the law, you ignore it or give them a slap on the wrist. When your opponents break the law, you come down hard, denounce them for trying to subvert democracy, and get key leaders put in jail. Make the law is complex so your opponents can never be sure exactly what they have to do to obey the law.
Eight: Get the media on your side. There are many ways to do this. In the long term, have your friends join media organizations and work their way up, until they fill the ranks. Get wealthy friends to buy important news outlets. Make friends with media leaders: tell them how important they are and how valuable to democracy and so on, give them "exclusive interviews", pass laws that are popular with the media now and then, etc. If you can do this, then you can make sure that the public hears a version of events favorable to you. When you slip up, they can bury the story. When your opponents slip up, they can trumpet it over and over. Oh, and to make this most effective, in editorial pages and talk shows, DON'T have just your side presented. Rather, have your side presented by articulate, attractive people. Then have your opponents' side presented by people who are carefully chosen to be totally unlikable, and who present the weakest arguments. No matter how fair and wise and well-reasoned your opponents are, you can always find SOMEONE who agrees with them who is ugly and stupid and selfish and so on. And if that actually gets hard, you can create fake organizations that will claim to side with your opponents but are really your stooges.
Nine: Long term: Get the education system on your side. Similar to eight. Then have them indoctrinate the next generation. Subtly at first, of course. Get history classes to teach how the failed policies of your opponents did so much harm to the country. Get economics classes to teach how much more propserous the nation would be if only we had economic policies that put more power in the hands of the central government. Teach members of minority groups that they are helpless and powerless and need a powerful central government to protect them from exploitation. Etc.
Well, I could go on. Note that none of this is ideas original with me. They're all things I've observed others do, mostly thinking of U.S. politics.