Home heating oil prices have spurted 12 percent in 3 1/2 months and reached an all-time high average of $1.16 1/2 a gallon here last week as cold weather continued to grip the Washington area. One industry analyst said the price could rise to $1.30 a gallon by the end of winter.

Six of the major oil companies supplying heating oil to about 300,000 homes and apartments in the area -- Amoco, Exxon, Gulf, Shell, Sunoco and Texaco -- raised their oil prices here by as much as 5 cents a gallon this week. Shell went up 3 cents a gallon yesterday after a 2-cent increase Tuesday.

A Shell spokesman attributed the increases to the recent sharp rise in world crude oil prices and to continuing decontrol of U.S. crude oil, which adds about 1 1/2 cents per month to the price of a gallon of heating oil or gasoline.

Last month's round of world oil price increases by the Organization of Petroleum Exporting Countries is expected to add about 8 cents a gallon to U.S. heating oil and gasoline prices. Not all of this increase has trickled through to the consumer.

"I can't keep up with the increases," said Nelson Woodson, head of the A.P. Woodson Companies, a large group of heating oil distributors here. He said he had not expected such large increases and now thinks home heating oil will cost $1.30 a gallon by the end of this winter.

At the same time heating oil prices are soaring, Washington area gasoline prices are beginning to move upward again for the first time in more than six months, according to a survey of local stations taken earlier this week by The Washington Post.

The survey shows that the average price of a gallon of gasoline here is $1.31 1/2, up just .3 cents a gallon from September when there was a national gasoline glut and major oil companies were competing and even lowering prices to unload the product. While full-service prices here have gone up slightly since September, self-service prices have gone down slightly.

Industry analysts expect gasoline prices to begin moving up sharply, perhaps reaching at least $1.50 a gallon by summer. During the glut, local gasoline dealers trimmed margins to about the limit, and a new wave of price increases from oil companies will be mostly passed through to motorists.

Amoco and Exxon, which provide half of the gasoline used in the Washington area, raised gasoline prices here by 2 cents a gallon last week. The Amoco increase was effective Wednesday, and the Exxon increase, announced yesterday, becomes effective today.

Shell also raised gasoline prices 3 cents a gallon yesterday, and Sunoco went up 1 1/2 cents a gallon Tuesday.

The well-known Lundberg Letter, a petroleum marketing newsletter, predicts the average price of gasoline nationally will rise 22 cents to $1.45 by December. Lawrence Kumins, an analyst with the Congressional Research Service, says the price could rise 45 cents price here at an average of $1.76 1/2 a gallon.

Surveys of gasoline and home heating oil prices taken by The Washington Post over the last two years show that gasoline has gone up in price about 82 percent and home heating oil about 143 percent during that period. The price of gasoline has been and remains controlled by the federal government, while heating oil prices have been uncontrolled.

A spokesman for Exxon in Houston said yesterday that since the beginning of 1980 Exxon has raised the wholesale price of gasoline and home heating oil by exactly the same amount -- 28 cents a gallon -- which suggests that local heating oil dealers have been able to increase their margins more than local gasoline dealers.

The Post survey shows that heating oil prices here have soared 12 cents a gallon -- or 12 percent -- since mid-September, while gasoline prices have gone up only a fraction during roughly the same period. The Post surveys, taken last week, do not reflect all of the most recent major oil company price increases.

A local heating oil executive who asked not to be identified said that heating oil prices increased faster than gasoline prices here because the heating season is short and heating oil companies have "got five months to make 12 months' profit."

In addition, he said, heating oil companies must keep large inventories of oil that are financed at the soaring prime lending rate. Gasoline dealers generally have small inventories.

Gasoline and heating oil prices began soaring two years ago when revolution in Iran triggered an international oil shortage. There were gasoline lines here in the summer of 1979, but special efforts to store heating oil prevented a shortage of that product last winter.

Gasoline prices soared early last year, but then world oil production continued to be so high that a gasoline glut developed in the United States. There also was excess supply because Americans were using 11 percent less gasoline and 15 percent less heating oil than two years earlier, according to the American Petroleum Institute.

But when war broke out between Iran and Iraq last September, those two oil-producing nations stopped exporting oil, and this cutoff began eroding high world oil inventories. Some experts think it could take as long as 200 days for excess world stocks to be worked down, but other experts think it could be sooner.

In fact, nobody knows how the war in the Middle East will affect the price and supply of gasoline and heating oil.

There are unlikely to be gasoline lines after next fall when the federal price controls and allocation system on gasoline end, oil analysts say. In any oil crisis after controls are gone, supplies will simply be determined by soaring prices. The new Reagan administration may decide to eliminate controls sooner.