The Office of Management and Budget has reversed its decision to bar the Veterans Administration and Housing and Urban Development Department from collecting information about the race, sex and ethnic background of applicants for home mortgage insurance.

Both HUD and the VA use the information to try to discover and correct discrimination in their insurance programs. But citing its authority under the Paperwork Reduction Act, OMB earlier this year had told the two agencies to delete sections of their insurance application forms that asked applicants to list their sex, race and ethnic background.

The budget agency reversed itself earlier this month after the decision drew angry reaction from Capitol Hill and HUD and the VA asked it to reconsider.

In a letter dispatched last month, five Republican and seven Democratic senators urged President Reagan to overrule OMB.

In addition, last week the House Banking, Finance and Urban Affairs subcommittee on housing approved a provision in the fiscal 1986 housing authorization bill that would require HUD and the Agriculture Department to continue asking for racial and ethnic characteristics of those who benefit from their housing programs.

The VA programs, on the other hand, fall outside the committee's jurisdiction.

OMB officials would not comment on the reversal of the agency's position.

OMB told the VA in February that it would have to delete the questions from its loan application form that asked for the racial and ethnic characteristics of applicants, and said HUD would be "required to make similar modifications on its forms."

The budget agency followed up in April with what it described as a "formal notice" to HUD that it must remove the same sections from the its applications.

HUD appealed, and on June 11, Douglas H. Ginsburg, administrator of OMB's Office of Information and Regulatory Affairs, replied, noting that OMB's approval of the HUD form did not expire until April 30, 1987, and "of course" HUD could continue to use the form "for the duration of that period."

HUD General Counsel John J. Knapp, in a recent memo to HUD Secretary Samuel R. Pierce Jr., said, "That isn't what the notice we received in April said."

In the memo, Knapp called OMB's reversal "a straight-faced backing off" from its original orders.

The VA's insurance application form was to have expired last month, and OMB had said it must delete the relevant questions before it would approve the form. But the same day Ginsburg wrote HUD, the VA was told it could continue to use the form until April 30, 1987, "to avoid any confusion."

Knapp said yesterday that OMB has yet not responded to HUD's appeal of its decision to bar the collection of racial and ethnic information in other HUD programs.

Knapp said HUD has not appealed the rejection of one form that tracks the use of minority contractors to build HUD-sponsored housing. A HUD proposal to require minority business enterprise reporting from local governments that receive community development block grants also was rejected by OMB and has not been appealed. Because the Commerce Department is responsible for coordinating minority business enterprise programs, Knapp said, HUD "wants to coordinate" any appeal with Commerce.