Washington — Social security, after passing through more perils than Indiana Jones in the movie ''Raiders of the Lost Ark,'' has finally been rescued. At some points during the past two years it seemed Democrats and Republicans would never be able to agree on what to do to save the troubled retirement system. But Congress, capping an extraordinary three months of bipartisan effort on the issue, last week passed legislation designed to ensure social security's solvency for the next 75 years.
On Friday, the White House announced that President Reagan will sign the rescue package the week of April 10.
''We are at the end of a long, hard road,'' said Rep. Barber Conable (R) of New York, a member of the National Commission on Social Security Reform (NCSSR), as the bill passed the House.
This marks the second time in six years that Congress has had to pull social security back from the brink of insolvency. The first rescue bill, passed in 1977, was also intended to shore up the system's finances into the 21st century. During the last years of the '70s, however, the US economy performed far worse than Congress expected, causing social security to slip back once more into cash-flow trouble.
That will not happen this time, say members of the commission, who shaped the package. The '77 effort depended narrowly on tax increases, they say, while this year's bill is broader in scope, containing money-saving benefit changes as well as new taxes.
And the bill that just cleared Congress also contains a ''stabilizer'' that is supposed to pull the system automatically out of financial morasses. Beginning in 1985, if the social security trust fund resources fall below a certain level, cost-of-living increases will be based on the previous year's increase in wages or prices, whichever is less. A more drastic ''fail-safe'' provision was dropped from the package.
In all, the just-passed social security bill contains $165 billion in new revenues and outlay savings during the next decade. In addition, it makes long-term changes intended to keep the system solvent for the next 75 years.
The basic structure of the package was hammered out in a last-minute compromise last January by the NCSSR. Key members of Congress, such as Sen. Robert Dole (R) of Kansas and Rep. Claude Pepper (D) of Florida served on the commission, and their support enabled the bill to pass the gauntlet of Congress almost unscathed.
Details of the House and Senate versions of the bill did differ slightly. Congressional conferees, who met in a 12-hour marathon session stretching into Friday morning, for the most part agreed to accept the House version. The bill's most far-reaching changes in the system include:
* A gradual hike in the official retirement age. Between the years 2003 and 2067, the age at which retirees qualify for full social security benefits would be raised gradually from 65 to 67.
* For the first time, social security would be allowed to dip into the Treasury's general tax revenues for funds. The package would roll forward payroll tax increases now scheduled for the rest of this decade. For the first such speed-up, scheduled to take effect next January, workers would be allowed to offset the increase with an income tax credit. Since the Treasury would lose tax revenue, this is a roundabout way of supplementing social security's trust funds with $5 billion of general revenue.
The January tax rise will cost the average, $21,000-a-year worker $1.21 a week, the NCSSR estimates. Further tax hikes would cost the average worker $1.87 a week more in 1988, and an extra $2 weekly in 1989.
* Social security benefits would be taxed for the first time. Half the benefit check of single retirees whose taxable income is above $25,000, and of married couples filing jointly whose taxable income is over $32,000, would be subject to income tax. This would affect the top 8 to 10 percent of retirees, according to NCSSR figures.
In addition, the bill would:
* Postpone this year's cost-of-living adjustment from July to next January. Thereafter, all COLA changes will occur at the turn of the year. This move will cost the average retired couple $222 this year, the American Association of Retired Persons estimates.
* Bring into the social security system new federal workers and all members of Congress, federal judges, and congressional and judicial employees. Congress has promised to design a supplementary retirement system for affected government workers.
In provisions unrelated to social security, the massive bill would change the way hospitals are reimbursed for medicare patients, extend emergency federal unemployment benefits, and boost the maximum benefit available under Supplemental Security Income, a welfare program for the elderly and disabled poor.