Senate Republicans, in an atmosphere of increasing partisan strife over Social Security, yesterday beat back, 51 to 45, a Democratic effort to replenish the near-empty old-age trust fund by borrowing from the Medicare and disability funds, which are not so bad off.

Opponents said they had no objection to interfund borrowing as such, but did not want to let Congress off the Social Security hook that easily. They want a more fundamental bill, cutting benefits to achieve solvency.

Meanwhile, the chairman of the Senate's Social Security subcommittee, William L. Armstrong (R-Colo.), said at a breakfast with reporters that he believes a consensus is developing to solve Social Security's problems by reducing annual cost-of-living increases and gradually raising from 65 to 68 the age at which people can retire with full benefits.

However, no signs of the supposed consensus were evident during floor debate. Sens. Daniel Patrick Moynihan (D-N.Y.) and Edward M. Kennedy (D-Mass.), who sponsored the interfund proposal as an amendment to the tax bill, angrily charged that President Reagan is using a relatively minor, temporary problem in Social Security as an excuse to proposed exessive long-range benefit cuts.

They said that interfund borrowing, even under pessimistic assumptions about the course of the economy over the next five years, would postpone exhaustion of the old-age trust fund to 1984 or 1985 at the soonest, and would allow a calmer look at the system's problems.

Moynihan argued further that, under the most likely economic course, the standard budget assumptions of the Congressional Budget Office, interfund borrowing combined with the cuts already made in Social Security under the budget bill could get the old-age fund through its immediate problems without any further cuts. This would allow decades to solve the long-range problems of the system caused by the gradual aging of the population.

But Finance Committee Chairman Robert J. Dole (R-Kan.), using more pessimistic economic assumptions, retorted that "unless the economy performs well, as much as $60 billion to $80 billion may be needed in excess of interfund borrowing" over the next five years to keep the old-age fund from going broke.