The Senate followed a heavily Democrat-led effort in the House on Saturday to approve a last-minute stopgap measure that funds the federal government for another 45 days just hours before a shutdown would have begun, keeping a slew of government services running and federal employees paid for the time being, though lawmakers still need to finalize a permanent set of budget appropriations.