Congress has agreed to forgive $110 million owed to the federal government by the St. Lawrence Seaway, which has been plagued by declining Great Lakes traffic and the rising cost of maintenance.

Traffic on the waterway, which links the Great Lakes with the Atlantic through the St. Lawrence River, has plummeted in the recession, mostly because of a 40 percent decline in shipments of iron ore this year.

As a result, the seaway could not have met the obligations on the debt remaining from its construction in the 1950s and the cost of overdue maintenance without a toll increase of at least 70 percent, said Dennis Deuschl, assistant to the director of the St. Lawrence Seaway Development Corp. Members of Congress and governors in the Great Lakes states feared that a new toll hike, on top of increases of more than 100 percent since 1978, would have diverted still more cargo to other ports.

The measure absolving the seaway of the $110 million owed to the federal government was tacked on to the $10.64 billion transportation spending bill for the 1983 fiscal year at the behest of Sen. Mark Andrews (R.-N.D.), whose state ships grain through Great Lakes ports.

It survived a last-minute attempt to kill it Thursday night when the House rejected an effort by Rep. Robert Walker (R-Pa.) to cut the measure out of the overall transportation bill. The Reagan administration had argued that the appropriations bill was not the right vehicle for dealing with the problems of the seaway. Now the president will have to veto the entire measure to turn back the seaway provision.

The seaway, a joint project of the United States and Canada, would have had to pay the Treasury $2 million a year through 1985, after which its obligation would have ballooned to $9.5 million a year. But total annual revenues are now running about $9.5 million.

"We really faced a financial crunch," Deuschl said. "The fact is that, for the past couple of years, we have had to defer a lot of maintenance and improvement work, and we couldn't have gone on much longer without real safety problems."