In an impressive example of how volatile and unpredictable Soviet politics have become, the popular, outspoken Boris Yeltsin was elected this week to the presidency of the Russian Republic - against the express wishes of Mikhail Gorbachev. This gives Yeltsin a rare political image in the Soviet Union - that of a man who can take on the system and win.

In 1985, Yeltsin, a construction engineer by trade, was an obscure official in the Ural Mountains industrial city of Sverdlovsk. Gorbachev brought him to Moscow to head the capital city's Communist Party organization, and his reform-minded, aggressive style soon took hold. He showed little reverence for the party hierarchy, and he campaigned in stores and on trolley buses to improve food supplies and public services. He spoke out against special privileges for the government and party elite.Muscovites were tired of watching their leaders zoom by in sleek limousines while they stood in line to buy soap, sugar and other scarce items. Yeltsin's borshcht-in-every-pot message had immediate appeal.

Yeltsin made Gorbachev nervous, especially when he aimed his vocal criticism directly at him. In 1987, Yeltsin made a stinging speech to a closed meeting of the Communist Party Central Committee, criticizing the slow pace of reform. In return, Gorbachev severely criticized Yeltsin and stripped him of his post as Moscow party chief.

It seemed to end his political career forever. But instead, his ever growing populist image has endeared him to millions of people. Today, from a visible position of power that could threaten Gorbachev's own power, Yeltsin talks of a more rapid transition to a market-economy than Gorbachev himself favors. He also talks of sovereignty, equality and independence for all 15 Soviet republics, a position not popular with Gorbachev.

As Gorbachev arrives in the United States for the summit with President Bush, he leaves behind massive discontent over a sinking economy. He also leaves behind a new charismatic leader who has already been saluted by policemen and old women wiping away tears while trying to kiss his hands.

Some fear that Yeltsin's victory will mean the defeat of Gorbachev's ambitious new economic program, and others think that Yeltsin's election might actually help Gorbachev achieve radical reform through his own brand of popular support. Certainly, Gorbachev needs more popular support for his programs than he has been getting. Some have said that Gorbachev is afraid of strong figures besides himself - even if this one could help him achieve his goals.

How Gorbachev deals with Yeltsin and his unmistakable popularity is the latest test of Gorbachev's leadership. It could portend significant change in the Soviet system or troubling new power struggles. Whichever way it goes, two Soviet leaders working in different ways to bring about a market economy should soon understand more about a process that is a way of life in the American system - controversy and compromise by those in power.