Gloom spread across the midcontinent today at news that an accident has closed the St. Lawrence Seaway for as many as three weeks at the height of the grain-shipping season.

Corn prices tumbled on the Chicago Board of Trade and, from Duluth and Thunder Bay on Lake Superior to Cleveland and Buffalo on Lake Erie, port officials mourned as the voyages of dozens of ships in the Great Lakes came to an unexpected halt.

The stoppage began Monday when a 150-foot section of wall collapsed in a key lock of the Welland Canal, which carries ships around the Niagara Falls between Lakes Erie and Lake Ontario.

After conferring most of the day, officials at the St. Lawrence Seaway Development Corp. headquarters in Massena, N.Y., said a temporary wall of steel bracing must be erected to stabilize the remaining wall in Welland Lock No. 7 before the lock can be fully drained and engineers can inspect the damage and chart the rebuilding.

Meanwhile, commodities experts and shipping agents throughout the Great Lakes region in the United States and Canada said that this is the worst possible time of year to disrupt the Seaway.

Millions of tons of grain are moving eastward from Midwest corn and soybean farms to foreign ports. Winter normally closes the Seaway, starting about Dec. 10 to 20.

Capt. Richard Legros, the harbor master in Thunder Bay, Ont., on the northern coast of Lake Superior, the largest grain port in Canada, declared: "It will be devastating for everyone from Thunder Bay right on down the Seaway. It's a chain reaction. It's very serious . . . . I'm holding my breath."

Grain traders in Chicago responded to the news with a selling spree of futures contracts in corn. The price fell 2 cents a bushel today for December-delivered corn, after closing Monday at $2.22 3/4.

David Bartholomew, a senior commodities analyst at Merrill Lynch Pierce Fenner & Smith, said the Welland accident "already is having its effect on the market."

"There is a depression in the nearby December prices, basically affecting corn," he said. "The accident keeps grain here in the Midwest, instead of getting it out. Delays in shipping may cause buyers to buy from some other origin."

Dale Gustafson, an analyst at Drexel, Burnham, Lambert here, said, "Nobody at this time of year wants to be left with corn on their hands."

John Adams, deputy chief engineer of the seaway, said, "There're going to be ships at anchor and port facilities idle until traffic resumes. Traditonally, this is the busiest time of year."

Adams said there were 18 ships westbound in the 26-mile-long Welland Canal and 12 vessels eastbound when the mishap occurred. The canal consists of eight locks that raise or lower ships a total of 326 feet between Erie and the lower Lake Ontario.

Those ships cannot proceed, and scores of others now are caught trying to get out of the Great Lakes. Still others are unable to enter the system and are waiting in the St. Lawrence River or out in the Atlantic.

The seaway, which celebrated its 25th year of operation last year, suffered an 18-day shutdown last year when a bridge in Valleyfield, Quebec, jammed halfway open. The shipping season was extended to make up the lost days.

When the section of the lock wall fell at 10:35 a.m. (EDT) Monday, it jammed the Liberian-registered Furia, eastbound with a cargo of grain, against the lock. The ship was extricated Monday night and was found to have suffered little damage.

Said the Coast Guard's Chief Petty Officer Richard Schmidt, at the Buffalo, N.Y., station: "It's like a highway just washing out. The canals are a major thoroughfare from the ocean to the Great Lakes."