Millions of Venezuelans head to the polls on Sunday for a presidential vote that represents a pivotal moment for the socialist movement that has governed the oil-rich nation for 25 years.

Over the course of a generation, Chavismo, as the movement is called, has shattered the nation’s democracy, presided over an extraordinary economic contraction unlike any seen outside of war, and become the source of one of the largest migrant crises in the world.

The election, held on the birthday of the movement’s founder, Hugo Chávez, pits Mr. Chávez’s successor, President Nicolás Maduro, against the previously little-known Edmundo González, a former diplomat.

But Mr. González is essentially the surrogate candidate for María Corina Machado, a hard-charging former lawmaker who has emerged as the nation’s newest opposition leader, rallying people behind a promise to restore democracy and bring Venezuelans back home. When Mr. Maduro’s government barred Ms. Machado from running for office, her coalition managed to get Mr. González on the ballot instead.

(A supporter of Margaret Thatcher, the conservative icon, some analysts and political commentators have taken to calling Ms. Machado the “Iron Lady.”)