Legislation to overhaul the federal tax system was revived late last night after President Reagan made an unusual lobbying pilgrimage to Capitol Hill and secured the support of 50 House Republicans, most of whom had defied him in a surprise mutiny last week.

The House Rules Committee met just before midnight and approved procedures for floor action on the bill that were designed to gain more GOP support. The committee, which must clear most legislation for floor action, gathered shortly after Reagan informed House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) that he had gathered the necessary votes.

House Democrats immediately began rallying support for a floor vote today.

"We'll be on the floor with tax reform tomorrow," House Ways and Means Committee Chairman Dan Rostenkowski (D-Ill.) said.

Word of the breakthrough on the GOP votes came from Treasury Secretary James A. Baker III and House Minority Leader Robert H. Michel (R-Ill.) less than an hour after Democrats had announced that they were preparing to declare the tax bill dead.

With Democratic leaders saying in one corridor of the Capitol that "time is running out," Michel emerged from his office with Baker to say that the president had persuaded 50 of the 182 House Republicans to vote to bring the tax bill to the floor and to pass it.

Democrats had said they needed 50 GOP votes to ensure that the bill would pass. In an unexpected revolt, all but 14 House Republicans voted to block consideration of the tax measure last Wednesday, dealing what was then believed by many to be a fatal blow.

Michel said that he and Rep. Jack Kemp (R-N.Y.), who last Wednesday had led the mutiny against the president, would vote for the revised procedural measure allowing consideration of the bill on the floor. Kemp said he would vote for the bill, although Michel said he told the president he would not.

The 11th-hour turnaround appeared to rely largely on Reagan's promise to Republicans in a closed meeting that he would veto the bill unless it is changed substantially from a measure produced by the Democratic-controlled House Ways and Means Committee.

Reagan said that in any final bill he would require a $2,000 exemption for all taxpayers, a lower tax rate on capital gains, a lower top tax rate for individuals and more generous depreciation schedules for business.

The Ways and Means Committee bill cuts individual tax rates, but not as much as Reagan wanted, and raises business taxes more than he wanted. In general, it gives individuals a $140 billion tax cut, then makes up that same amount by doing away with many business deductions and credits.

"I'm now assured the president would veto something that didn't have the elements I'd like to see in tax reform," Kemp said in explaining his switch.

Republicans also attributed their change of heart to a compromise that would allow a separate vote on a nonbinding resolution calling for a delay of implementation in some of the bill's business provisions until Jan. 1, 1987.

The separate resolution was aimed at satisfying both Democrats and Republicans by avoiding amendments to the Ways and Means overhaul plan, while still allowing Republicans to put their concerns on the record.

In another compromise, Republicans will be allowed to change their alternative package by maintaining existing tax benefits for federal pensions. The change could put considerable pressure on Washington-area Democrats because federal worker's organizations strongly oppose the pension tax provision of the bill crafted by the Democratic-dominated Ways and Means Committee, which generally would result in higher taxes on federal pensions in the early years of benefit payments.

Although all of these compromises were on the table by the time Reagan completed his pitch to the Republicans, fewer than 50 vowed their support on a secret ballot after the president left, a Republican source said.

The other votes were secured in telephone calls by Michel and Baker to members who had not voted, the source said.

The GOP commitment of 50 votes put the onus back on Democratic leaders to steer the tax bill through the House. "I can't imagine Democrats stranding the leadership of this party, knowing full well we'd be blamed for the death of tax reform," a Democratic aide said.

During their afternoon meeting, Republicans told Reagan that delaying implementation of tax overhaul was one of their key goals, but Democrats continued to resist amendments to the Ways and Means legislation.

By day's end Reagan had persuaded four of eight of the GOP leadership to vote to bring the tax bill to the House floor, and three to vote for passage. GOP Conference Secretary Robert J. Lagomarsino (R-Calif.), Congressional Campaign Chairman Guy Vander Jagt (R-Mich.) and Conference Chairman Rep. Jack Kemp (R-N.Y.) said they would vote for the bill, and Michel said he will join them in voting to bring the bill to the floor. Those members of the leadership who still say they plan to try to block the bill are Reps. Lynn M. Martin (R-Ill.), Trent Lott (R-Miss.), Dick Cheney (R-Wyo.) and Jerry Lewis (R-Calif.).

The maneuvering occurred in a supercharged political climate with both chambers rushing to complete work to adjourn for their Christmas recess. "I think tonight is it," said Rep. Richard A. Gephardt (D-Mo.). "We're running out of time rapidly."

Although some Democratic support for tax revision has slipped, vote-counters said early yesterday about 176 Democrats would support the bill, 12 fewer than voted unsuccessfully last week for bringing it to the floor.

Reagan's visit soothed House Republicans who voted against the White House position last week in part because they feel the administration has ignored their concerns. Despite the apparent breakthrough on Republican votes, GOP leaders continued to express doubt about the substance of the bill.

"We've tried to communicate those as best we can on a regular basis, not only all week but in meetings months ago," Michel said.

His voice rising, Michel said he repeatedly warned Reagan that cooperating with House Democrats "may end up with a product most of our members can't support."

Reagan was asked by reporters on leaving the meeting whether he had saved tax revision, and responded, "We were just having a Christmas party." Vice President Bush, asked the same question as he left the meeting, said, "We'll just have to wait and see." White House spokesman Larry Speakes said Reagan was "pleased [and] encouraged" by the "open give and take" of the meeting.

Cheney, an opponent of the bill, said yesterday that the president's appearance had swung some votes and may have made the difference. "It's hanging right there on the edge," he said, "it could go either way."

Rep. Newt Gingrich (R-Ga.) said perhaps 20 to 25 members asked questions of the president during the 40-minute meeting. His demeanor was described as gracious and he made no reference to the defection last week of all but 14 Republican legislators on a key procedural vote that sent the tax bill into limbo.

He did, say, however, as he left, "Let's keep in better touch in the future than we have in the past." Reagan ended his appeal with a request to support the Democratic bill to move tax overhaul to the Senate. "This particular approach should be viewed as an opportunity, not as a product," Reagan was quoted as saying.

But Republicans remained concerned that Reagan was going all-out for a Democratic bill that many of his fellow Republicans strongly oppose.

"The most disappointing thing was that after all these very sincere statements about legitimate concerns about the tax bill, the final wrap-up came off of cue cards," said Rep. F. James Sensenbrenner Jr. (R-Wis.). "The input we gave him really didn't make any difference."

And some suggested Reagan had committed a tactical error by raising the stakes through a personal appeal while the fate of the bill was still in doubt.

"I personally think he made a mistake. It stands to be perceived as him suffering another setback" if the legislation ultimately fails, said Rep. E. Thomas Coleman (R-Mo.).