The spot-market price of crude oil fell sharply yesterday following the failure of members of the Organization of Petroleum Exporting Countries to agree on new production quotas, and a number of analysts forecast a continuing decline in world oil prices in the first half of 1983.

Despite the agreement of OPEC ministers at this week's meeting in Vienna to stick with the benchmark price of $34 a barrel established in September, 1981, the belief of oil companies that rampant price cutting will accelerate was reflected in a drop in the spot-market price to $30.40.

Some analysts said if crude prices continue to slide and consumer demand remains weak, the retail price of gasoline may not rise despite enactment by Congress yesterday of a nickel-a-gallon increase in the federal gasoline tax.

While few analysts yesterday were predicting the imminent demise of OPEC or a precipitious fall in oil prices, most agreed the cartel's effectiveness in propping up petroleum prices had been greatly diminished by its inability to agree to limits on how much each member will sell.

John C. Sawhill, a former deputy secretary of energy who is now a senior partner with McKinsey & Co., said he felt Saudi Arabia would probably cut its prices at some point in 1983 "to send a strong signal to the other OPEC countries" of the need for agreement on national quotas.

Sawhill said he anticipated crude oil prices would decline by $2 to $4 per barrel in coming months.

"I think a real price break is not going to take place in 1983, but an erosion is a real possibility," said John Lichtblau, president of the Petroleum Industry Research Foundation. "There is no way oil prices could increase in 1983 short of a Middle East war or a revolution in Saudi Arabia.

"If crude oil prices decline, most of that will be passed on to the consumer because of the excess refining capacity," Lichtblau predicted. Since there are 42 gallons in a barrel, a $1 decline in the price of a barrel suggests a decrease of about 2 cents a gallon.

Edward Murphy, director of statistics for the American Petroleum Institute, also predicted that with demand weak and the oil companies battling for gasoline customers, "most if not all of any crude decrease would be passed through" to the motorist.

Dan Lundberg, publisher of a weekly newsletter that surveys nationwide gasoline prices, said retail gasoline prices already have dropped almost 10 cents a gallon since the beginning of 1982, and said he thought prices would continue to drop "by as much as a penny and a half a month into spring."

This marks a sharp reversal of the trend that saw a 6.5-cent increase in gasoline prices in 1981 and a 10-cent increase in gasoline prices in 1980, and raises the possibility that by May, motorists may find prices at the gas pump are back at the level of two years ago.

"There is no sign of anything causing prices to increase," Lundberg said.

At the same time, Lundberg said that despite isolated reports of leaded gasoline being sold for under $1 per gallon, he saw "no way" that gasoline prices would ever return to that level on a widespread basis. The average overall price of gas nationwide was $1.23 cents a gallon as of Dec. 17, he said.

A number of analysts noted yesterday that if the kind of fall in crude oil prices did occur that could lead to sharply lower gasoline and home heating oil prices, the impact on other segments of the American economy would be close to disastrous.

"It is not impossible that there will be a precipitous price break," said Walter Levy, an international petroleum consultant. "But if the price went to $20, the trouble that would be caused would be enormous.

"For this country, the immediate impact would be most serious in terms of the solvency of our energy industry and the liquidity of our banking system," Levy said. "And if oil prices should fall that precipitiously and stay low for any period of time, it would be the basis for a new oil crisis in due course."