The House passed a $16.3 billion housing bill yesterday that would rescue several programs the Reagan administration wants to kill, authorize sale of public housing units and halt nearly all construction of new public housing.

In a surprise vote, House members approved an amendment authorizing the sale of all the country's public housing units to the tenants living in them for 25 percent of market value. Rep. Jack Kemp (R-N.Y.), who introduced the amendment, called it "a giant leap forward" for low-income Americans. Kemp said if the bill becomes law, property worth $14 billion could "immediately" be transferred to public housing residents.

The final bill, which passed 340 to 36, is a Democratic-Republican compromise scaled down from the $23.3 billion measure that Democratic backers have been trying to pass for three years. It goes to the Senate, where a housing bill is pending.

The legislation would require $860 million in fiscal 1986 funds originally designated for construction of new public housing units be used instead for modernization of existing public housing. Opponents said the amendment would halt nearly all new construction of public housing.

The bill also would extend federally assisted housing programs through the end of fiscal 1987, reauthorize the Community Development Block Grant and Urban Development Action Grants, which the administration wants to kill, and the Farmers Home Administration rural housing programs for the same period.

An amendment authorizing creation of 100 enterprise zones in cities and rural communities, designed to boost local economies and provide jobs, was passed 366 to 32. The amendment, sponsored by Kemp and Rep. Robert Garcia (D-N.Y.), did not authorize federal funds or tax incentives but required that states participating in the program provide assistance to the zones.

Tenants would be permitted to manage the public housing projects they live in under an amendment sponsored by Kemp and Democratic Rep. Walter Fauntroy of the District of Columbia and approved by a wide margin. The measure, based on what Fauntroy said was the successful experience in a large D.C. public housing project, Kenilworth-Parkside, would fund training programs for residents and allow tenant management groups to use any savings for self-help programs.

The House voted down a substitute bill introduced by Rep. Chalmers P. Wylie (R-Ohio) that would have cut spending for housing programs by about 40 percent. In introducing the substitute, Wylie said President Reagan has made clear he would veto the House bill.

The bill would reauthorize the Federal Housing Administration mortgage insurance program through the end of fiscal 1987 and make several changes in the rules. One would prohibit FHA from insuring houses owned by investors. Wylie, who submitted the amendment, said investor-owned property accounts for 12 percent of the insurance issued and for 30 percent of claims against the fund.

The Department of Housing and Urban Development is investigating more than 30 cases of alleged fraud involving FHA insurance, he said, adding that the insurance program is no place for "real estate investors and fast-buck artists." Another change, approved overwhelmingly, would require credit checks on people assuming FHA-insured loans.

Another provision would change HUD regulations requiring the expulsion of all illegal aliens living in public housing, even cases in which some members of a household are U.S. citizens or legal alien residents. Under the House measure, a family with at least one legal resident could remain in public housing.