Mr. de Blasio had expressed support in theory for transit discounts, which could benefit as many as 800,000 New Yorkers. But he has held firm to the notion that the best approach to pay for the discounts would be a new tax on high-income earners — a funding mechanism that he also favors to underwrite new spending on improvements to the faltering subway system.

His stance has appeared at odds with his political image as an advocate for the poor and a supporter of social service programs. But locked in a bitter dispute with Governor Cuomo over funding for the city’s beleaguered subways, Mr. de Blasio maintained that he could not commit the city to more transit spending, especially given the record of the Metropolitan Transportation Authority, the state agency that runs New York City Transit.

“Look, the goal is laudable,” Mr. de Blasio said last month. “I believe there’s a better way to pay for it on an ongoing basis.”

Nonetheless, the fair-fares issue has broad appeal to the mayor’s liberal Democratic base, and he may ultimately seek to claim it as his own.

Mr. Johnson had lobbied aggressively for the proposal, marshaling his colleagues in the Council to hand out fliers at subway stops, appearing in a web advertisement and repeatedly arguing for it in private meetings with Mr. de Blasio. The speaker has made the case that the city, flush with cash from rising tax revenues, could afford to take on the new spending itself.

“There’s money to do this,” Mr. Johnson said in an interview last month.

Last week, Mr. de Blasio indicated that he would be willing to fund some portion of the plan during an hourslong late-night meeting in Gracie Mansion, according to two people briefed on the meeting. At around midnight, Mr. de Blasio offered $25 million. But Mr. Johnson, who wanted the program fully funded, walked out.

A spokesman for Mr. de Blasio initially declined to confirm or deny that an agreement had been reached. “I have no reaction to it,” said the spokesman, Eric F. Phillips, on Thursday. Later he said in a text message: “We are still working. There is no deal.” He also denied that Mr. Johnson had walked out of the meeting last week.