Gregory and Janet Matloff, like many young couples living the American dream of owning their own home, were in trouble.

The 1851 brick row house they had bought in 1974 in the Fort Greene section of Brooklyn overlooking New York Harbor needed major repairs.

"We were overextended as far as the banks were concerned," says Janet Matloff. "Two years ago, we weren't sure the house would make it through the winter. Then a friend told us of the government's loan program. We secured a $13,000 loan for 20 years at 3 percent interest."

She adds, "The house is a little gem of a Gothic revival now."

The Matloffs obtained their long-term, low-interest loan under the federal government's Section 312-Rehabilitation Loan Program created in 1964 to help forestall decay in the nation's large cities.

The Fort Greene section of Brooklyn is a "declining neighborhood," according to the Matloffs, an assessment corroborated by city officials.

The 312 Program that helped the Matloffs and hundreds of other New York homeowners is threatened with extinction. It is among the budget cuts proposed by President Reagan.

That proposal has drawn sharp criticism from New York City Council President Carol Bellamy and Anthony Gliedman, city commissioner of Housing Preservation and Development, who have called upon the administration to continue funding the program.

"Despite outward appearances," Bellamy says, "New York is not just a city of high-rise buildings. There are a half-million owner-occupied one- and two-family homes in the city. These homes are the backbone of the city's housing stock, providing stability to such neighborhoods as Fort Greene.

"This is a program that works," she adds. "Abandoning it when it is becoming most effective at restoring our housing stock would be tragic."

Gliedman says: "The 312 Program represents the only hope for low-income people who have managed to obtain part of the American dream -- a home of their own -- but are prevented by rising costs from maintaining their homes. This program, because it provides financing for repairs and maintenance, when conventional sources are unavailable, can help keep that dream a reality."

Although the program goes back to the days of Lyndon Johnson's "Great Society," Congress has been inconsistent in funding it. The pipeline didn't really open until the mid-1970s when Congress began to pour money in, appropriating nearly $500 million through 1980.

New York homeowners last year received the highest total under Section 312 -- more than $8.3 million in loans for a total of 290 single- and multi-family home rehabilitations.

Los Angeles County and City received $5.8 million in loans for a total of 239 rehabs; Chicago, $4.7 million for 100; St. Paul, Minn., $4 million for 117; Baltimore, $3.2 million for 43; Seattle, $2.9 million for 27; Boston, $2.6 million for 88; Kansas City, Mo. $2.4 million for 119; Minneapolis, $2.3 million for 72; and Portland, Ore., $1.7 million for 165 rehabilitation projects.

Bellamy says the program has not benefited low-income homeowners as much as intended, noting the average loan in New York City was for $21,000 and that almost half the loans were granted to homeowners with incomes of more than $25,000 annually.

She urges continuation of the program with a greater outreach effort for the low-income homeowner.