The federal government has reached the legal limit on the amount of Federal Housing Administration and Veterans Administration mortgages it can guarantee, threatening a major disruption of the nation's housing market.

The limit involves the Government National Mortgage Association, a key link between lenders and the capital markets, which supply funds for FHA and VA loans.

Virtually all FHA and VA loans -- up to 20 percent of all home loans issued in the United States -- go into what is known as mortgage-backed securities. These securities are sold to investors, who then become entitled to the payments made each month by the homeowners. The system provides lenders with additional funds to make more loans.

The securities, known as Ginnie Maes, are very popular because the FHA and VA promise to cover any defaults by the homeowners, and the Government National Mortgage Association guarantees investors will get their money and get it on time.

However, GNMA, which is part of the Department of Housing and Urban Development, is limited by law in the total volume of loans it may guarantee annually. This year, as a result of plunging interest rates and an avalanche of refinancing by homeowners, the organization hit its limit of $65.3 billion Monday, weeks earlier than expected.

Without the federal backing, mortgage bankers and savings and loan associations will stop making FHA and VA loans, or charge more for them, said Glenn S. Corso, of the Mortgage Bankers Association, a trade association.

"We will need firm action from Congress by the end of April to stave off disruption of the market," said Silvio DeBartolomeis, the FHA commissioner. FHA's own loan insurance authority will expire April 30, at about the same time lenders are expected to use up Ginnie Mae loan commitments they are now holding, he said.

Congress, the housing industry and Ginnie Mae itself were caught by surprise, as millions of Americans, taking advantage of the lowest interest rates in several years, rushed to refinance their homes or to buy new houses. The dollar volume of loan commitments made by Ginnie Mae in four days in early April topped the number for all of March, Corso said.

Lenders across the nation are holding $35 million in Ginnie Mae commitments that they have not used, but it is unclear how much of this amount will be taken up by loans already in the pipeline, according to Glenn R. Wilson, president of Ginnie Mae.

HUD will ask Congress to raise the ceiling to $87 billion, which would give Ginnie Mae about $22 billion more in guarantee authority for the rest of the 1986 fiscal year, an official said yesterday. However, industry officials question whether that will be adequate. In February and March, Ginnie Mae guaranteed nearly $21 billion in loans, according to figures provided by the Mortgage Bankers Association.

HUD originally wanted to request an increase to $95 billion, but the figure was cut back by the Office of Management and Budget, according to an administration official, who asked not to be named. The relatively small increase asked is based on changes the administration is seeking in FHA rules, which would cut down on the number of loans insured.

Housing subcommittee aides in the Senate and House predicted Congress would quickly approve a hike in Ginnie Mae's ceiling, probably a larger one than the Reagan administration is expected to request. When the administration announced plans to sharply reduce the ceiling on VA-guaranteed loans to meet budget deficit reduction targets, Congress came to the rescue swiftly with a $17.4 billion limit, compared with the $11.5 billion the White House wanted.

"Certainly we will increase the limit. How quickly is hard to say, probably at best a couple of weeks," said Philip A. Sampson, staff director for the housing and urban affairs subcommittee of the Senate Banking Committee.

FHA itself is limited to $57.4 billion in loan guarantees this fiscal year, and HUD and OMB are discussing how much more to request from Congress, according to DeBartolomeis. If the present rate of loan applications continues, FHA will need more than $100 billion, he said.

Among the program changes under consideration, DeBartolomeis said, are limiting FHA insurance to families with annual incomes of $40,000 or less and barring loans for investors, second homes and vacation homes.

These proposals already have drawn opposition on Capitol Hill.

Despite assurances that more loan guarantee authority will be approved soon, the abrupt halt in Ginnie Mae activity has unnerved many in the industry.

"The situation is serious and will do nothing but get worse" unless Congress acts quickly, said the Mortgage Bankers' Corso.