Congress passed and sent to the president early today a Social Security rescue bill that would include all new federal employes in the system beginning next year. The House vote was 243 to 102. The Senate vote was 58 to 14.

The original Senate bill had bowed to resisting federal employe unions and agreed to defer their inclusion. But Senate conferees yesterday quickly backed down and yielded to the House, 4 to 3.

The president, vice president, federal judges and members of Congress also would be brought into the Social Security system next year.

The most important other issue that had divided House-Senate Social Security conferees was how much to raise the retirement age in the next century. The House had voted to lift it gradually from 65 to 67, the Senate to 66.

The conferees agreed on the House provision to raise the retirement age to 67 by the year 2027.

Designed to raise $165 billion over the rest of this decade to shore up the retirement system, which otherwise would run out of funds this summer, the rescue bill would speed up scheduled tax increases, defer the cost-of-living increase in benefits from July 1 to next January, and for the first time tax half the Social Security benefits of recipients in higher income brackets.

In addition, the big bill would continue for six months the program of extended unemployment benefits for the long-term unemployed and set up a new system of so-called prospective payment for reimbursing hospitals under Medicare, in effect fixing medical fees in advance. It also would raise Supplemental Security Income payments by $20 a month ($30 for a couple) in July.

The bill's quick progress through the two houses in a period of politically divided government was an achievement that many viewed as unattainable when Congress convened two months ago.

The two political parties were quarreling bitterly over how to rescue Social Security, with Republicans leaning toward benefit cuts, Democrats toward tax increases.

But a bipartisan presidential advisory commission recommended a compromise Jan. 15, President Reagan and House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) both endorsed it, and Congress has pretty well gone along.

The Senate provision on federal employes, sponsored by Russell B. Long (D-La.), would have left new employes out of Social Security until Congress also set up a supplementary retirement system for them, the equivalent in industry of a private pension plan. Federal employes have a civil service retirement system.

House Social Security subcommittee Chairman J.J. Pickle (D-Tex.) told Long that meant federal employes might never be brought into Social Security, or not for many years.

Failure to bring them in would cost the system money in the short run, since at first more employes would be paying taxes than drawing benefits.

Senate conferees then voted to drop the Long amendment, with all four Republicans led by Finance Committee Chairman Robert J. Dole (R-Kan.) agreeing to yield, and all three Democratic senators on the conference committee opposed.

The bill sent to Reagan would:

Postpone this year's cost-of-living increase to next January and give future cost-of-living increases in each January.

Bring all employes of nonprofit organizations under Social Security next Jan. 1, and bar withdrawal of state and local government units once they have decided to join the system.

Subject, starting in 1984, one-half of Social Security benefits to federal income tax if that half boosts adjusted gross annual income over $25,000 for individuals and $32,000 for married couples filing joint returns. Non-taxable income would be counted in determining income levels, but would not be taxed.

Accelerate scheduled Social Security tax increases so that in 1984 employes and employers would each pay 7 instead of 6.7 percent on the first $37,800 of pay. For the worker, this increase would be offset next year only by a credit on income taxes. The tax rate would then rise to 7.51 percent in 1988 and 7.65 percent in 1990.

* Require self-employed persons to pay a Social Security tax equal to the combined employer-employe rate, but with continuing income tax credits to offset part of the increase. At present, they pay less than the combined rate.

* Peg, starting in 1985, each year's cost-of-living increase to the previous year's increase in wages or prices, whichever is less, whenever the trust funds fall below specified levels. Prices are the only determinant now. Conferees agreed that this provision would serve as a "fail safe" in case of emergency, and dropped a more drastic provision.

* Fundamentally alter the way the government pays hospital bills under Medicare by setting up a prospective payment plan under which the fees would be set in advance for various services. Hospitals that failed to keep their costs below the target fee would lose money. In two major decisions on this provision, the conferees agreed to set reimbursement figures for nine regions and then move toward a single national level, while phasing in the new system over three years; and to keep a guaranteed return on capital in existence for private hospitals until 1986, but reduce it below the levels in current law.

* Liberalize the Social Security earnings limit in 1990; a Senate provision to remove the limit was dropped.