Soviet President Mikhail Gorbachev is getting into deeper and deeper trouble, and there seems to be no end in sight.

An historic popular vote in the Soviet Union is not nearly as democratic as he would have us believe, and potentially more troublesome for Gorbachev personally than he could have safely predicted.His long-sought Sunday referendum on keeping the union together is clearly not going to accomplish all that he hoped.

Soviets voted first on whether to support his efforts to keep the deeply divided country together under his leadership, and that seems to be winning - even though six states seeking independence refused to take part in the vote.

Considering the strong-arm tactics and propaganda used throughout the country in connection with the election, the Soviet vote really resembles more closely an inexperienced version of the old style Chicago political machine of the late Richard J. Daly.

The Soviet leaders are dabbling in democracy but really have no idea how it works or especially what it means to them in the long run.

Then in the Russian republic, citizens voted on whether to make the presidency a popularly elected office instead of one appointed by Parliament. Preliminary returns from Moscow, Leningrad and other parts of the Russian Federation indicate overwhelming support of the people for the democratic approach.

Boris Yeltsin, who currently holds the chairmanship of the Russian Federation, is not only Gorbachev's arch-enemy, but a heavy favorite to win the presidency in any popular vote.

So Gorbachev wins the first one and loses the second one - and yet he needs both to go his way for his leadership to be protected.

It is unclear what political capital Gorbachev might try to make of his apparent victory in the national voting. It is to be fervently hoped that he does not use it as a pretext to crack down on separatists by using more of the violence he has already unleashed on the Baltic states.

The fact is that Gorbachev has opened a Pandora's box by initiating glasnost and perestroika, then starting to panic when democratic style reforms work against him.

The only way this elementary exercise in democracy could produce positive results is if Gorbachev finally accepts the democratic principle of people-rule and rejects the old style Soviet dedication to force.

Only time will tell how far this will go, but Gorbachev's time seems to be running out.