Congress, acting with unusual speed and restraint, gave final approval yesterday to a no-frills, 45-day extension of spending authority to fund the government after the new fiscal year starts next Tuesday.

In less than two minutes, with only two members on the floor, the Senate gave voice-vote approval to a House-passed continuing resolution and sent it to President Reagan, who has indicated he will sign it.

The stopgap measure funds all agencies, including the Defense Department, at current levels or at levels contained in preliminarily approved appropriations bills for fiscal 1986, whichever is lower.

The action means that the government will enter the new fiscal year without the usual deadline-defying showdowns that have often caused brief agency shutdowns until compromises were reached.

But it could be only a temporary reprieve. Controversies that normally erupt in connection with passage of the Oct. 1 stopgap measure are being put off to await a debt-ceiling extension that must be passed by mid-October. Governmental disruptions could occur at that time or when a new continuing resolution is required by Nov. 14.

The stopgap funding is needed by agencies for which Congress has not passed regular appropriations bills by the start of a new fiscal year, when previous spending authority expires. Congress has yet to enact any of the 13 regular funding bills, and only a few are considered likely to pass by Oct. 1.

Enactment of stopgap funding has become routine as deficit-related budget hassles have delayed action on appropriations. But normally the bill has become a battleground for both spending controversies and showdowns over extraneous issues ranging from abortion policy to weapons procurement. Often the fights have forced government agencies to shut down for a day or two for lack of funds.

This year was different for several reasons. For one, legislation to raise the federal debt ceiling to $2 trillion must be passed within the next couple of weeks, providing an even more dramatic showcase for legislative posturing.

Moreover, with spending authority from the first continuing resolution due to expire Nov. 14, Congress will have to pass a second one because some appropriations bills are not expected to pass even by mid-November. The second stopgap is likely to be what lawmakers affectionately refer to as "the last train out of the station" as they load it up with all the year's leftover legislative baggage.