Poland's martial-law authorities tonight announced that they were placing the giant Lenin Shipyard here under military discipline following two consecutive days of strikes to protest the dissolution of the independent trade union Solidarity.

As happened yesterday, street fighting erupted in Gdansk today after riot police attacked crowds of Solidarity supporters gathered outside the gates of the shipyard. Demonstrators threw stones and erected barricades and, at one point, attacked police guarding the regional Communist Party headquarters, but were driven back after reinforcements arrived.

The sound of percussion bombs, tear-gas grenades and flares resounded around Gdansk well after nightfall. Some of the heaviest fighting took place in the suburb of Wrzeszcz near Solidarity's former headquarters where demonstrators hurled molotov cocktails at police and manned burning barricades for several hours.

The shipyards in Gdansk have traditionally been a detonator of social upheaval in Poland. Two Polish leaders -- first Wladyslaw Gomulka and later Edward Gierek -- were toppled from power following strikes by shipyard workers along the Baltic Coast. It was also on the Baltic Coast that Solidarity was born.

This time, however, the strikes seem doomed to failure. The military government of Gen. Wojciech Jarulzelski is much more determined than its predecessors to suppress unrest.

By militarizing the shipyards, the authorities have, in effect, raised the penalties faced by the workers for disobedience. The prospect of Draconian prison sentences by military courts, together with other disciplinary measures, is likely to further divide the workers between those who want to press ahead with the strikes and those who favor going back to work.

At a press conference in Warsaw, government spokesman Jerzy Urban said that only 10 percent of the work force at the shipyard was on strike. Workers interviewed outside the yard insisted that at least three quarters of them were still striking, but conceded that some had gone back to work after being threatened with dismissal.

Throughout the day, the shipyard's gate number 2, made famous in news photographs all over the world during the labor unrest of August 1980, was under the control of the strikers. They plastered the gate with red-and-white Polish flags and altered the name of the shipyard to read "Solidarity" rather than "Lenin."

Workers said that inside the yard the management was having some success in breaking the unity of the strikers. At midday, loudspeakers broadcast a warning by a public prosecutor of mass dismissals unless the strike ended.

The first shift streamed out of the shipyard gates at 2 p.m. to applause from onlookers and rhythmic chants of "Solidarity, Solidarity." A crowd of sympathizers, gathered beneath the monument to shipyard workers killed in 1970, put up their hands in the "V for victory" sign as leaflets were distributed reading "Solidarity lives. We will win."

One elderly worker, however, said he saw little chance of the government yielding to the strikers' demands, which include the lifting of martial law, the release of all political internees and the restoration of Solidarity.

"Victory over this regime can only come over dead bodies," he said bitterly.

So far there is no evidence that the strikes will spread to other parts of the country, although Wednesday could be crucial since it marks exactly 10 months since the imposition of martial law. There have been unconfirmed reports of strikes in the northwestern port of Szczecin, but the rest of the country appears calm.

The morale of the strikers in Gdansk has been undermined by the absence of visible leaders. Organizing a strike is punishable by up to 10 years' imprisonment under martial-law regulations and this has meant that few workers are prepared to take any initiative on their own.

When the workers entered the shipyard at 6 this morning, they were greeted with loudspeaker announcements saying the strike was costing 80 million zlotys (nearly $1 million) in lost production per day. In some departments, foremen warned workers that they would be fired immediately if identified from photographs as being elsewhere than at their jobs.

One worker said the manager in his department gathered everybody together and asked if they planned to continue the strike. Silently they nodded their heads in the affirmative.

When the manager asked what the strike was about, there was again silence. But finally one worker burst out: "You fool, you know what it's about . . . martial law, unions and our colleagues who have disappeared."

During the morning, the shipyard was surrounded by riot police, and passers-by were not allowed to approach gate number 2. The police were withdrawn shortly before the end of the first shift, allowing many shipyard workers to return home and the smaller second shift to enter the yard.

Ninety minutes later, at 3:30 p.m. , the entire area around the shipyard was sealed off and columns of riot police, headed by armored personnel carriers and water cannons, moved in to disperse a crowd of about 2,000 Solidarity sympathizers who were still gathered around the monument.

The demonstrators, shouting, "Gestapo," were scattered throughout the town. From the vantage point of the Heweliusz Hotel, it was possible to see police firing flares straight into groups of demonstrators and lashing out with their long, white nightsticks at anyone they could catch. They appeared to be under orders to detain as many people as possible.

Solidarity sympathizers were pursued into shops and into the main railway station, which was surrounded by white clouds of tear-gas smoke.

But the police did not have it all their way. At one point, several dozen reservists who had been assigned to guard the Soviet Consulate in Gdansk were attacked by demonstrators and had to be rescued by professional riot troops.