Congress yesterday passed legislation that will give many members a major new tax deduction this year--large enough to wipe out all tax liability in some cases--and gilded the gift with an amendment designed to prevent tax audits.

The tax break, attached to a bill restructuring the black lung program, was approved by the House 363 to 49 and the Senate 63 to 30.

Under the legislation, members of both House and Senate will be guaranteed the right to take as "business deductions" the cost of maintaining second homes in Washington. Those who own homes here could depreciate them. Also permissible would be deductions of rental payments for those who rent; home maintenence and utility costs; laundry; and work-related telephone charges.

These breaks would be in addition to the deductions available to all taxpayers for mortgage interest charges and property taxes.

The legislation amends a provision of the tax code that limits deductions taxpayers can take on second homes if their families live there with them more than 14 days a year; this is designed to keep taxpayers from taking undue tax advantage of vacation homes.

In an effort to help insure that members of Congress can be protected from audits, Senate Finance Committee Chairman Robert J. Dole (R-Kan.) won passage of an amendment that requires the Treasury Department to issue guidelines to members of Congress spelling out the amount of deductions they could take without having to substantiate them.

If, as some persons expect, this allowance is set at a flat rate of $75 a day for every day Congress is in session, it would amount to a $12,000-a-year deduction.