The Soviet Union and other Polish allies sharply attacked the independent trade union Solidarity today, accusing it of launching a "counterrevolutionary campaign" against the communist authorities.

The attacks coincided with a four-hour strike by millions of Solidarity members throughout Poland. As that country's latest crisis rapidly approaches a climax, most other Eastern European governments appear to want to strengthen the resolve of hardliners in the Polish Communist Party leadership for a final showdown with the Soviet Bloc's first independent union.

Dissociating themselves from the latest criticism were two independent-minded communist states in the Balkans, Yugoslavia and Romania, which appealed for Poland to be allowed to solve its own problems without outside intervention.

The strongest attacks came from Poland's immediate neighbors -- the Soviet Union, East Germnay, and Czechsolovakia -- which are currently holding joint military maneuvers with Polish troops inside Poland.

Tass, the official Soviet press agency, accused Solidarity and other activists in Poland of pressuring the government "to make it accept demands of an antisocialist, antipeople nature." It called leaders of Solidarity and KOR, a support organization, "political instigators who are blocking the country's way out of the grave socioeconomic crisis."

Western analysts in Moscow said the sharp tone of this and other recent Tass statements appeared to be an important public signal that Moscow, behind the scenes, is demanding not only a hard line against further concessions but also a rollback of the gains made by the Polish workers already, Washington Post correspondent Kevin Klose reported from Moscow.

The Tass account pointedly noted that Poland's government-controlled television "broadcast calls of Solidarity to hold the strike" -- something that could never happen in the Soviet Union. Analysts interpreted Tass' handling of this account as criticism of the Polish leadership for letting the government's most powerful propaganda tool be used against the government itself.

The official East German daily Neues Deutschland described today's warning strike by Solidarity and its plans for a general strike Tuesday as "provocations."

It accused Solidarity's leaders of unleashing "a counterrevolutionary campaign of agitation throughout" Poland to back up the strikes. Some anticommunist pamphlets now flooding Poland went so far as to threaten to murder party officials, it alleged.

Prague radio, meanwhile, described the strikes as "an open attack on the communist system in Poland."

Of the Eastern European governments, Prague and East Berlin have taken the lead in condemning the liberalization movement in Poland, comparing developments there with events in Czechoslovakia before the Soviet-led invasion of August 1968.

All Soviet Bloc countries are immensely concerned about events in Poland, both because of the effect of disruption there on their own economies and the long-term danger of what they see as ideological contamination. The situation has already caused enormous headaches for planners throughout the region because of shortfalls of coal and other traditional Polish exports such as sulfur and sugar.

Some members of Comecon, the Eastern European trading bloc, are believed to have turned to Western countries to supply several million tons of coal expected from Poland. They have also been tapped for extra food shipments to Poland and financial assistance to relieve the country's $26 billion hard currency debt.

But their overriding concern is political: the fear that the stability and cohesion of the bloc could be threatened if Poland is allowed to go its own way. This worry appears to be shared even by reform-minded communist leaders such as Hungary's Janos Kadar, who held talks with the Polish Communist Party leader, Stanislaw Kania, just over a week ago.

Until recently, Hungarian comment on the Polish situation was relatively restrained. But yesterday, the Budapest daily Magyar Hirlap said Solidarity's present actions revealed its political aims and the "counterrevolutionary" forces hiding within it.

The unfolding drama in Poland has doubtless reminded Kadar of his own experience in 1956. After crushing a popular uprising in Hungary with tanks, the Soviets chose Kadar to restore order. Following an initial period of authoritarian rule, Kadar gradually introduced reforms and has managed to turn Hungary into one of the most prosperious and stable societies in Eastern Europe.

But the odds are gainst a similar feat in Poland in the event of an invasion, even if the Kremlin were able to find as skillful a politician as Kadar. Poland is three times Hungary's size and, partly because of its strong Roman Catholic tradition, boasts a more cohesive and desciplined opposition to communist rule.

By making clear their preference for a firm line with Solidarity, Poland's allies could be hoping to influence the outcome of a crucial Central Committee meeting in Warsaw on Sunday. With hardly any backing from ordinary Poles, hardliners in the leadership are counting on the support of other Eastern European capitals in their bid for political power.

What is not clear is how they would propose to govern the country if they managed to topple Kania, who is regarded as a moderate, or gained a decisive influence in policy. Solidarity would react strongly against any attempts to reverse the changes made so far.

A change in political leadership, if accompanied by a harder line, raises the prospect of starting a sequence of events that could be resolved only by outside intervention.

It is this possibility that worries Yugoslavia, which also protested strongly against the invasion of Czechsolovakia in 1968. at a press conference, the president of the Yugoslav parliament, Dragoslav Markovic, warned that "intervention is no solution since every intervention calls for a new intervention at a later date."

Neighboring Romania has adopted a somewhat more ambivalent attitude toward events in Poland, expressing strong reservations about the emergence of independent unions. But a Romanian Communist Party resolution also urged that Polish Communists be allowed to deal with their crisis themselves "without any outside interference.