Poland's parliament, in a compromise with the independent labor federation Solidarity, took a major step today toward far-reaching labor reforms and limitation of the Communist Party's influence over the economy.

Without opposition, the parliament enacted legislation giving Polish workers self-management powers in their factories, similar to those of systems in Yugoslavia and Hungary.

If fully implemented, the new law could lead to even more radical reform here than in Hungary or Yugoslavia since those countries have communist parties more powerful than the one here and they act as central constraints on the independence of enterprises.

The parliamentary compromise between rival drafts submitted by the government and Solidarity appeared to be a sign that even in times of internal tension and pressure from the Soviet Union, it remains possible here for the two sides to reach agreement.

The legislation provides for the independence of individual factories and the gradual dismantling of the traditional "command" economy imposed on Poland by the Communist Party after World War II. Traditionally in Soviet Bloc countries, production and pricing decisions are made by central planners and transmitted to factory directors by way of a huge bureaucratic apparatus.

While such a system has the merit of being able to mobilize huge resources, it is now regarded by most Polish economists as hopelessly inefficient and the major cause of Poland's economic crisis. The reform is designed to decentralize decision-making in the economy and make it more responsive to commercial pressures.

Despite the compromise, there are still many outstanding disputes between communist authorities and Solidarity that could result in new confrontations. They include the union's demands for greater access to the mass media and a proposed trade union law allowing the government to decertify a union in certain circumstances.

Many of the details of how the new system will operate remain to be seen. Although similar experiments have been tried with success in Yugoslavia and Hungary, Poland faces the enormous obstacle of attempting to introduce reforms at a time of political and economic uncertainty.

Workers' councils were established in Polish industry in 1957 following an earlier upheaval. But their powers were limited and gradually whittled down even further by the government, which was determined not to let control over the economy slip out of its hands.

This time the workers' councils -- to be chosen by secret ballot -- will have responsibilities corresponding to those of a board of directors in a Western factory.

They will decide on investments, distribution of income, production, and pricing.

The major difference between the rival drafts submitted to parliament was that the government wanted to reserve to itself the right to appoint directors while Solidarity insisted that this power should be vested in the workers' council. Under the compromise version passed today, both sides will have a say in appointing directors depending on the nature of the enterprise.

In strategic industries and public utilities, the director will be chosen by the relevant ministry and the appointment submitted to the workers' council for approval. In other cases, the workers' councils will initiate the appointment and the government will have the right of veto.

But there could still be disputes over the list of factories to be considered "of strategic importance."

In most Polish factories, informal workers' councils have already sprung up even before enactment of the law. Since a majority of workers are represented by Solidarity, the union has a dominant voice on most workers' councils but the pro-communist unions are also represented, as are the Communist Party and its youth organizations.

Enactment of the law could provoke protests from some militant Solidarity branches at the second stage of the union's national congress, which opens in Gdansk tomorrow. Some union members have been calling it "a sellout" in view of their earlier demands for the two rival drafts to be put to a nationwide referendum.

But the compromise is strongly supported by Solidarity leader Lech Walesa and it seems likely it will be accepted by a majority of the 900 delegates at the congress.

The final version also represents a partial backdown by authorities since Communist Party leaders had insisted that the party would never relinquish control over appointments to the economic apparatus. Parliamentary sources said the party leadership accepted the new formula following the threat of rebellion by many influential members of parliament who were determined to push through a compromise.