GDANSK, Poland (AP) _ The shadow of unemployment hangs over the Lenin shipyard in Gdansk, birthplace of the Solidarity trade union and once a showpiece of Polish industry.

The trouble this time is not labor unrest, but whether the state-owned yard will keep operating in the face of mounting money problems and a government that says it is ready to begin shutting down financially ailing plants.

Solidarity activists discount the possibility that the yard will shut down, but management and representatives of official worker organizations believe it is a real possiblity.

A strike at the yard May 2-10, led by Solidarity leader Lech Walesa, ended without a settlement. Workers were demanding free trade unions and higher wages.

During the strike, management announced that it was unable to qualify for new state subsidies or credits from the national bank, and it said the yard's future would have to be decided by the Ministry of Industry.

''We are going on with production without a single zloty (less than a penny) in the cash box,'' the weekly newspaper Zycie Gospodarcze recently quoted shipyard director Czeslaw Tolwinski as saying. The newspaper described the yard as a ''giant on partly rotten legs.''

The shipyard is a jumbled heap of docks, aging buildings and huge cranes towering over a series of Vistula River tributaries and canals near the heart of this centuries-old Baltic port city.

It will produce only 11 ships this year, down from the annual high of 27 that it made in the late 1970s.

The number of workers, too, has dropped, with only about 5,000 involved in direct production.

Ironically, says yard foreign trade manager Ireneusz Kubiczek, the yard could produce more ships and has customers clamoring for them. But a lack of manpower is preventing it from exploiting its physical capacity.

Whether the yard makes or loses money is a debatable question because so much depends on arbitrarily set tax regulations, material costs and credit rates which fluctuate widely and are beyond the shipyard's control, said Jerzy Bukowicz, president of the worker's self-management council. The council's job is to help run the shipyard along with management.

But in a sign of confidence, 11 hulls were launched this year in order to have work for next year, he said.

Officials say the strike cost 500,000 hours of labor, which must be made up by overtime and higher productivity. Workers got pay increases June 1, but management says the increases were planned before the strike.

The increases were slightly higher than the 40 percent raise the government said could be allowed in response to price increases imposed this year. Pay now averages about 50,000 zlotys ($111) a month and is structured to provide incentive for harder workers, said Waldemar Langer, a leader of the yard's official trade union.

Despite the improvement, the yard's main trouble is that it cannot attract a sufficient work force, said Kubiczek.

''We have lost 5,000 workers from the early 1980s until now,'' he said. ''It is our own near-tragedy. We have survived the most difficult years of the crisis in shipbuilding, and now the market is reviving. And we have clients willing to place orders.''

As an example, Kubiczek cited a timber-carrying ship ordered by the Soviet Union. The yard has been able to contract to produce only 12 of the vessels, while the Soviets need 150, he said.

The Soviet Union is by far the yard's biggest customer. A sign inside the 343-acre facility says 575 out of 881 ships produced there have been for the Soviets.

With more workers, the yard could nearly double production, Kubiczek said.

But instead, workers are going to smaller private companies or cooperatives where they can make more money and work indoors.

As a state-owned company, said Kubiczek, the shipyard is unable to raise wages dramatically because it would be hit with a punitive tax designed to fight wage inflation. It is one example of how national economic policies have hurt the yard, he said.

Poland's frequently changing strategies to deal with its ailing economy have taken a toll in other ways, he said.

''At least once a year, every year, we are confronted with a new set of regulations and modifications of these rules for economic reform, while our commitments extend out many years ahead.

''It makes it practically impossible to predict whether the contract we sign today, which seems to be profitable, will in fact be practical,'' he said.

One of the people who does not believe the yard will close is long-time Gdansk Solidarity activist Bogdan Borusewicz.

''First of all, someone has to build ships for the Russians. Secondly, nobody really knows whether the Gdansk shipyard is making profit or losing money, because the prices for materials and components, such as steel plating and engines, are not market prices really,'' he said.

The yard has a history of worker militancy. In December 1970 protests over food prices, an unknown number of employees were fatally shot by security forces. A towering monument to them, erected outside the main gate, was one result of the August 1980 strike at the yard that catapulted Solidarity and Walesa to worldwide fame.

The inconclusive May strike showed that tensions persist, especially among younger workers.

Indeed, a decision to close the yard would likely set off a new round of unrest.

''It is my firm belief that the workers themselves would not allow it,'' said Grzegorz Szrejder, a 27-year-old welder active in Solidarity.