WASHINGTON — The House gave grudging approval on Tuesday to a plan to finance the federal government for three more weeks, even as dozens of Republicans broke with their leadership and opposed the stopgap legislation.

Congressional leaders said the measure, which imposes $6 billion in new spending cuts, would avert a government shutdown while giving Republicans and Democrats until April 8 to conclude a more sweeping budget deal to finance the government through Sept. 30.

“Our goal is to cut spending and keep the government open and meet our commitment to the American people to bring fiscal responsibility to Washington,” Speaker John A. Boehner said.

Though the legislation had the strong support of Mr. Boehner and his top lieutenants, more than 50 members of the Republican rank-and-file opposed it, including 21 of the 87 Republican freshmen. The opponents said they were ready to force a showdown over spending cuts and accused Democrats of stalling a final resolution.