The freeze on new U.S. financial credits for Poland is having a severe effect on agricultural production, senior Polish officials said today.

The officials went on to describe the government's crash attempt to stimulate its own problem-plagued farm sector.

"We're not hiding the fact that sanctions hit us in a touchy spot," government spokesman Jerzy Urban told reporters. He and Agriculture Minister Jerzy Wojtecki declared, however, that a planned reorientation of national priorities, which has set agricultural production as a top economic goal, would make Poland self-sufficient.

Most worrisome for officials here is the future of Poland's chicken farms, heavily dependent on feed corn imported from the United States. Chicken is a major portion of the Polish diet, accounting for 40 percent of the average person's ration of 5 1/2 pounds of meat per month.

U.S. corn had been imported at special terms under the American commodity credit program, but a new $740 million credit request from Warsaw, pending when martial law was imposed Dec. 13, has been denied as part of President Reagan's suspension of fresh financial credits to Poland.

While the Warsaw government is still free to purchase U.S. grain commercially, Polish officials suggested today that the U.S. sanctions were helping to strangle the livestock industry here and starve the country.

Wojtecki said Poland is currently short between 3 million and 3.5 million tons of grain. The shortage, he said, could lead to a loss of about 350,000 tons of poultry--the equivalent of nearly three months of the rationed chicken supply.

Western analysts agreed with these figures but noted that about one-third of the grain shortfall is due not to a lack of imports but to the government's inability to persuade Polish farmers to sell their own produce.

In other news, spokesman Urban provided additional details about the battle last weekend between demonstrating youths and police in the port city of Gdansk but said in answer to questions that the rest of the country had remained calm despite the sharp jump in food and other prices that went into effect Monday.

Urban said the Gdansk clash erupted when a crowd of about 3,000, most of them youths, gathered before a memorial to workers slain in antigovernment riots in 1970 outside the Lenin Shipyard--site of the strikes in the summer of 1981 that gave rise to the independent trade union movement Solidarity. The crowd came to place flowers and burn candles in connection with the U.S.-designated Solidarity Day last Saturday.

Because such gatherings are against Poland's martial-law regulations, Urban said, police arrived to disperse the crowd. There were "hostile chants" against the police who used tear gas and water cannon to break up the ceremony, Urban said.

A government communique Sunday night reported that six civilians and eight policemen were injured. Urban said there were no fatalities.

Gdansk has since been placed under an extended curfew and is now subject to the harshest restrictions anywhere in Poland. Foreign correspondents, however, were told today that they will be able to visit the city Tuesday on an officially arranged trip.

Urban also confirmed that a student demonstration had taken place at the engineering university in Wroclaw, southwest of Warsaw. But he said the action amounted to students in a dormitory singing, chanting and caterwauling on two consecutive nights.

In Warsaw today, a leaflet written by the Independent Student Association--a national student union disbanded by Poland's military authorities--was being distributed calling for a day of student solidarity on Feb. 18, the first anniversary of the union's registration.

The single-page sheet recalled the widespread student strikes of last winter that led to democratic reforms of the country's university system. The fate of the reforms under Poland's new order remains unclear.

Asked to characterize the popular response to this week's food price increases, Urban acknowledged that "discussions" among workers were under way in in a number of factories, often turning "heated" as was the case, he said, in the Ursus tractor factory on the outskirts of Warsaw.

But he said the talk has been not about the need for the increases, which he claimed is generally accepted. Rather, he said, it is about specific hikes and the nature of the income increases that Poles have been promised as partial compensation for the higher prices.

Poland's agricultural situation reflects the depth of the problem confronting the authorities in trying to restructure a tottering economy. In fact, the normal economic links between town and countryside have been virtually broken.

Despite a relatively good harvest last year, the state has been unable to buy about 800,000 tons, or roughly 25 percent, of the grain it contracted for with farmers.

There are two reasons. First, farmers are hoarding grain, uninterested in acquiring more currency since there is little to buy with it nowadays. Second, farmers can sell whatever grain they want at much higher prices on the free market.

To encourage grain sales, the government announced a "grain loan" program last month under which farmers would receive bonds redeemable after this year for deliveries of grain outside regular contracts.

He said that if this approach did not work, the government might be forced as a "last resort" to introduce compulsory grain sales--a measure that had been in effect during the Stalinist era of the early 1950s and is recalled bitterly by farmers today.

To boost agricultural output, Warsaw officials are reorienting industrial production to give priority to farm machinery. The hope is to increase domestic grain production to make up for the decline in grain imports. Officials also plan to deemphasize beef production and increase the breeding of cheaper, more quickly produced pork for export to earn desperately needed hard currency.