A sharp surge in imports of Japanese cars helped to widen the U.S. merchandise trade deficit in November to $13.7 billion, the third-largest monthly deficit on record, the Commerce Department reported yesterday.

The total gap between imports and U.S. exports is $131.8 billion through November, already surpassing the record $123.3 billion deficit for all of last year. A 61 percent increase in imports of Japanese cars and a smaller rise in oil imports helped increase the deficit from $11.5 billion in October.

U.S. exports have been so battered by competition that they now account for the smallest share of the nation's output since 1977, Commerce said.

Many economists said yesterday they had thought the deterioration of the U.S. trade picture had begun to turn around with the relatively smaller deficit in October and the increase in some prices of goods made abroad. However, economists now say it is too early to see an improvement in the deficit as a result of the decline in the value of the dollar since its peak in February.

A lower-valued dollar makes U.S. goods cheaper abroad and increases the prices of foreign goods sold here. Since February, the dollar's value has declined more than 21 percent. That fall already is showing up in higher prices for foreign goods, particularly Japanese-manufactured products, but has yet to make a dent in the trade figures.

Just yesterday, Toyota Motor Sales U.S.A. Inc. announced it will raise the suggested retail price of its cars and trucks an average of 3 percent, or $269, effective Friday because of the higher-valued yen. Toyota was following the lead of other Japanese auto makers.

Commerce Secretary Malcolm Baldrige said yesterday that the decline of the dollar "should limit further increases in imports and begin to promote export growth next year."

"The dollar's decline and passage of a farm bill will improve the competitivenes of our agricultural exports," Baldrige said. Until recently, agricultural goods were the mainstay of U.S. competitiveness overseas.

Since the start of consecutive record trade deficits in 1982, there has been a loss of 200,000 jobs in manufacturing, which the industry blames on the deteriorating trade situation. The high dollar also has added to the economic problems on America's farms, which have been unable to export as many goods at high prices because of worldwide surpluses.

The trade deficits and resulting job losses have been the impetus for the strongest resurgence in protectionist sentiment in Congress in 50 years.

Much of the protectionist sentiment has been aimed at Japan, whose surplus with the United States grew last month from $3.2 billion in October to $4.6 billion.

The widening of the trade gap in November was blamed largely on the influx of Japanese cars, in addition to a surge in general manufactured goods, said Robert Ortner, the Commerce Department's chief economist. Imports of manufactured goods rose 12.4 percent in November, from $20.3 billion to $22.8 billion.

At the same time, the value of Japanese car imports rose from $1.134 billion in October to $1.831 billion last month, an increase of 61.5 percent, Commerce said.

David Wyss, an economist for Data Resources Inc., said the sharp increase in auto imports could be because of a problem the government has had in correctly gathering data. In addition, Japanese car companies have said that they will eliminate the current quota system on exports of their cars to the United States.

Wyss also said that Japanese car shipments here have fallen behind their goals, and they may be trying to catch up from possible losses last summer when American car companies instituted cut-rate financing incentives to maintain and enlarge their market shares.

Since September, the dollar has fallen from 240.10 yen to about 202 yen, a 16 percent drop. Such a drop should begin turning around the trade picture, along with further discount-financing programs started recently by American automobile companies to spur sales, Wyss said.

Unlike the financing programs this summer, the U.S. auto companies are not losing much money because interest rates are lower, reducing the difference between what auto companies must pay to obtain funds to lend to buyers and the amount they receive in making the discount loans, Wyss said.

Oil imports rose 3.2 percent in November after a 31-cent-per-barrel drop in price, Commerce said. The increase in import volume was attributed to U.S. oil companies being forced to replenish inventories after postponing purchases in recent months in hopes of a sharp drop in prices, Wyss said. Rather than wait any longer, companies were forced to buy more oil.

Imports in November totaled $31.7 billion, 7.1 percent greater than the average between January and October. Exports were $18 billion, 1.1 percent greater than the monthly average for the first 10 months of the year.

The trade deficit with Canada, America's largest trading partner, declined last month from $2.04 billion to $1.98 billion. The deficit with the European Community grew from $1.5 billion to $2.5 billion.