Ms. Quinn, a Democrat who is running for mayor, had faced a quandary over whether to support some version of paid sick leave legislation, which is opposed by Mayor Michael R. Bloomberg, an important ally, and by many business leaders, whom she has tried to court in her campaign.

Since 2010, Ms. Quinn had said that the bill’s original version, which would have required businesses with at least five employees to provide five days of paid sick leave a year, would put an undue burden on small companies at a time when New York’s economy was still shaky.

In March, after council members hatched a plan to force a floor vote on the bill, a move that would have undermined Ms. Quinn’s authority, she reached a compromise with the bill’s advocates.

The mandate will not take effect until April 1, 2014. Between then and Oct. 1, 2015, only businesses with at least 20 employees will be required to provide five paid sick days. After that, the mandate will extend to businesses with at least 15 employees. Manufacturing businesses will be exempt. The bill also allows for the regulation to be postponed if the city’s economy worsens, as measured by an index published by the Federal Reserve.

Ms. Quinn’s office has said the final bill will guarantee paid sick days to nearly one million workers. Mr. Bloomberg was expected to veto the bill, but Ms. Quinn said there were enough votes to override his objection.

At a City Hall rally on Wednesday, the bill’s supporters said that they were happy the measure was being passed, even if it did not include everything they had wanted, and expressed gratitude to Ms. Quinn. “We will continue to push for coverage of all size employers to create a level-playing field, but this new law is a huge step,” said Nancy Rankin, a vice president of the Community Service Society.

Ms. Quinn thanked the advocates for listening to the concerns of small businesses and revising the bill to make it less onerous on them. “This is not just a great day for workers,”she said. “It is a great example of how we can bring people together through the legislative process.”

Even as the rally was going on, a spokesman for Bill de Blasio, the public advocate and one of Ms. Quinn’s rivals in the Democratic primary, issued a statement belittling her role in the bill’s passage.

“Today is a step forward, but it’s one that has come years late because of Speaker Quinn’s obstruction,” Mr. de Blasio said in the statement, adding, “I’ll continue fighting until all families have this fundamental right.”

During a news conference later, reporters pressed Ms. Quinn about Mr. de Blasio’s criticism and the opposition to the bill by Mr. Bloomberg and members of the business community. “Obviously you can’t always get everyone to agree,” she said. “We’ll just have to respectfully disagree.”