WARSAW, JAN. 30 -- The Polish government announced the highest price increases for basic goods in six years here tonight, raising the cost of food by an average of 40 percent.

The price rises, due to take effect Monday, followed a campaign by the government of Gen. Wojciech Jaruzelski during the past four months to win public acceptance for the measures as part of a strategy of economic restructuring and liberalization.

Though partially compensated by an immediate wage hike for state workers equal to about 20 percent of the average pay, the increases will hit many Poles hard.

According to figures released tonight, the price of bread and prime meat cuts will rise 39 percent on Monday.

Sugar prices will go up 50 percent, gasoline 60 percent and milk 35 percent. State apartment rents will rise 50 percent.

The highest increase, of 200 percent, will be for coal, the country's most common fuel, and will take place April 1. Charges for gas, heating fuel and electricity will be doubled at that time.

A statement released by the state news agency and reports on state television said the average retail price increase would be 36 percent this year, including 40 percent for food.

The figure excluded the increases of 46 percent in alcohol and 40 percent in cigarettes.

The statement said the increases were needed in order to reduce government subsidies, introduce realistic prices into the economy and encourage efficient production.

They form part of a program that also is supposed to include a substantial expansion of private enterprise, a reduction of the size and power of the central state bureaucracy and the increased use of market forces to regulate the economy.

Overall, the price increases were the highest since February 1982, when Jaruzelski's government raised prices an average of 100 percent while the country was under martial law.

Official announcements tonight sought to portray the inflation as modest and "a compromise," comparing it to the 110 percent average food-price increase originally proposed last October.

That proposal was abandoned after the government failed to win support in a Nov. 30 national referendum on its policy program.

A government poll conducted at the time showed a high level of discontent among Poles and suggested a "social explosion" was possible if radical austerity measures were implemented.

Though opposition leaders have said they do not expect major protests to follow the price increases, there have been signs of government concern about public reaction. Popular uprisings following food-price increases in 1970, 1976 and 1980 caused the downfall of two previous communist leaders and led to the creation of the Solidarity independent trade union.

After showing detailed charts outlining the price increases and changes in pensions and family subsidies on the evening news program, state television invited viewers to call its studios and question experts about the increases. Special programs explaining and justifying the measures were broadcast throughout the night.

Shoppers had jammed stores and formed two-block-long lines outside gas stations during the past two days as rumors of the price increases spread around Warsaw.

Poles reported seeing panic buying of vodka, sugar, flour and other goods, and the price of rationed gasoline on the black market was quoted as much as five times above its normal level.

Some shoppers said they had seen rare supplies of luxury goods like oranges, nonrationed chocolate and champagne in stores in an 11th-hour goodwill gesture to consumers. The stocks were quickly exhausted, and many basic goods were hard to find in stores today.

The government's official position is that the price increases will not cause a drop in the standard of living, though the state trade unions and government polls have reported that few believe that assertion. Wages in the state sector are supposed to go up by an average of 36 percent, with only 20 percent guaranteed and the rest dependent in each state company on its profitability and increases in productivity.

Overall inflation is forecast by the government to rise to between 42 and 44 percent, compared to 27 percent in 1987. Many economists are skeptical that the government will be able to hold wages to the established level because of potential labor unrest. In each of the last six years, Jaruzelski's government has allowed excessive wage increases in a bid to maintain labor peace in factories, which nullified the effect of price rises and forced new increases.