Prices for gasoline and home heating oil rose sharply in November, offsetting a moderation in food costs, as the wholesale price index rose another 0.8 percent, the government said yesterday.

The broad November increase -- more than 10 percent at an annual rate -- pushed the index to twice its 1967 level and signaled the continued refusal of the economy to bow to the Carter administration's anti-inflation program.

The Labor Department reported that the price of gasoline rose 1.6 percent last month, while wholesale home heating oil prices jumped 1.8 percent. At the same time, a drop in the price of meat helped hold the increase in food prices to 0.6 percent. Earlier this year, food prices were the chief cause of inflation.

Increases in wholesale prices do not translate directly into higher retail costs, but do serve as an indicator of prices to come. November's index reinforced recent comments by White House officials that the inflation rate may not begin to moderate significantly until next spring.

In more bad news for the economy, the Commerce Department said businesses expect to reduce their investment in plants and equipment during the first half of 1979, heightening fears among economists that the nation may be headed for a recession.

And in another development, the Federal Reserve Board reported a slow-down in the growth of consumer borrowing in October, indicating less willingness by consumers to take on debt to finance their purchases. If consumers continue to slow their spending, many analysts worry, this, too, could trip the economy into a recession.

The wholesale price report came less than 24 hours after the White House announced an investigation of reported shortages in unleaded gasoline, a factor contributing to price increases. Administration officials have warned that consumers should expect either higher energy prices or more gasoline shortages next year, despite the anti-inflation program.

Meanwhile, Chicago Mayor Michael Bilandic, seeking to quell criticism by the White House of a proposed 60 percent pay raise for city aldermen, sent his top budget officials to meet with Alfred Kahn, the president's chief inflation fighter, to try and work out a compromise. At the same time, however, Illinois Gov. James R. Thompson said he would "take the heat" and not bow to public sentiment against an already approved 40 percent salary increase for state legislators.

With the salary hikes for public officials in Illinois and several other places threatening to undermine the administration's wage-price program even before major union contracts expire next year, White House officials have angrily rebuked the offenders.

President Carter, at a breakfast meeting with reporters yesterday, called the raises "a very serious challenge."

Food prices were one of the main bright spots in yesterday's inflation picture. The 0.6 percent increase in November was a dramatic drop from the 1.7 percent leaps reported in both October and September. Government price watchers attributed the slow-down to downturns in the prices for beef and veal and fresh fruits and to a considerably smaller increase for pork. Prices of fresh and dried vegetables, eggs and sugar were higher.

But the relief in wholesale food prices wasn't enough to balance sizable increases in two principal areas. Consumer nondurables -- gas and oil products, alcoholic beverages and health products -- soared 0.9 percent, the biggest monthly increase this year. Capital equipment, including machine tools and motor parts, rose a full 1 percent, the largest rise since October 1977.

Analysts attributed most of the increase in machinery prices to a recent surge in orders from busy automobile and aircraft manufacturers, and to active oil and gas exploration companies that have drilled more wells this year than in any of the past 20 years.

The sharp increase in nonfood wholesale items is particularly important since economists view fluctuations in nonfood prices as better indicators of the future than the behavior of more volatile food prices.