CHICAGO — Illinois took a crucial step on Tuesday toward ending a budget impasse that has imperiled the state’s fiscal future, but major questions remained even as a threat loomed that the state’s bond status might be lowered to junk.

In a rare holiday session in Springfield, where Democrats control both legislative houses, the Illinois Senate voted 36 to 18 to raise taxes, and then later in the day swiftly overrode the governor’s veto of the measure. The actions brought the state perhaps the closest it has come to a budget in more than two years — the longest any state has gone without one. The measure would raise $5 billion by increasing the personal income tax rate and the corporate tax rate.

The issue now comes down to a test of clashing philosophies and political loyalties after years of growing pressure: Will the minority of Republicans in the House stick with Gov. Bruce Rauner, a multimillionaire who had never held political office before, in his rejection of a tax increase without changes like a property tax freeze and cuts to workers’ compensation?

In vetoing the budget, the governor said it had failed to solve Illinois’s deep fiscal problems.

“This budget will require even more tax hikes to balance the budget and pay down the bill backlog,” Mr. Rauner said. “This budget puts Illinois on track for major future tax increases and will lead us to become the highest-taxed state in America in the coming years.”

After a hectic day of back and forths, a final test is expected to come this week when House leaders try to summon enough bipartisan support — including from more than a dozen House Republicans who have already broken with Mr. Rauner — to block the veto and move forward with a budget.

Michael J. Madigan, the House speaker and one of the most powerful Democrats in the state, told a local television station on Tuesday, “My expectation is that the bills that the Senate just passed will become law.”

Susana A. Mendoza, the state comptroller and a Democrat, praised lawmakers on Tuesday for approving the budget package, calling them “courageous” and thanking “the principled state senators of both parties who put the needs of their constituents ahead of political risks today.”

At least nine states, including Illinois, began a new fiscal year on July 1 with no budget, but several had worked out deals by Tuesday, including Delaware, New Jersey and Maine.

Lower than expected revenue in lots of states had created tension and an unusually large number of extended legislative sessions. On Monday, Gov. Paul R. LePage of Maine, a Republican, reached a deal with Democrats that scrapped a lodging tax increase, but added money for Head Start programs and protected behavioral health reimbursements.

In Springfield over the last several days, lawmakers from both parties said they were exhausted, embarrassed and alarmed by the consequences of extending the budget deadlock, which has left the state with some $15 billion in unpaid bills.

They scrambled to avoid even more treacherous consequences of the budget impasse, including a ratings downgrade.

In order to override Mr. Rauner’s veto, the House needs 71 votes. On Sunday, the measure passed with 72 votes, including from some Republicans.

Some lawmakers said they felt they had no choice but to act, even if it meant a tax increase.

S&P Global Ratings said on Monday that it was encouraged by the House’s passage of the budget bill, saying that if a comprehensive budget was passed, it could “help put a halt to this erosion of the state’s sovereignty over its fiscal affairs.”

It warned that even with a budget, however, “it’s likely that Illinois’s finances would remain strained and vulnerable to unanticipated economic stress.”

The budget impasse began more than two years ago, when Mr. Rauner and the Legislature failed to agree on the terms of a budget. Mr. Rauner wanted to tie the passage of the budget to changes in workers’ compensation and collective bargaining rights for unionized public employees; Democrats rejected those demands.

The standoff has persisted since, and many middle-class Illinoisans have scarcely noticed, shrugging off the conflict as the latest dysfunction out of the State Capitol.

It has been low-income and older residents, those in need of social services and college students who have felt it most acutely. Many nonprofit organizations and social service groups that have contracts with the state have not been reimbursed for a full year or more.

Downstate, public institutions like Southern Illinois University have limped along without a budget; administrators are especially worried that schools could lose their accreditation, which could threaten students’ ability to access hundreds of millions in federal financial aid. The museum at Southern Illinois University, a 143-year-old institution, closed last week because of the budget crisis.