Within legal circles, the effort is known as Civil Gideon, a reference to the 1963 Supreme Court case that established a right to counsel in criminal cases.

It is gaining traction in New York as the city grapples with an affordable housing crisis. The total stock of affordable housing is dwindling, according to many measures, while costs are rising. From 2000 to 2012, the number of apartments renting for $1,000 or less dropped by 400,000, according to an analysis by the city comptroller, Scott M. Stringer.

“People are literally falling off a cliff fighting for necessities without a lawyer,” said Jonathan Lippman, the former chief judge of the New York State Court of Appeals, who has long argued that the poor should have a right to counsel in civil cases. “The playing field is uneven, lopsided because the tenant has no idea how to navigate the system.”

The bill has brought together a broad coalition that includes labor unions and the New York City Bar Association, as well as traditional tenant rights advocates. On the steps of City Hall on Monday, elected officials, including borough presidents from the Bronx, Brooklyn and Manhattan, the city comptroller and the public advocate, gathered to register their support for the bill. A large crowd of tenants who turned out waved signs and chanted “legal aid.”

The mayor’s office has not taken a position on the pending legislation, but Steven Banks, the commissioner of the Human Resources Administration, whose agency now coordinates the city’s legal initiatives to prevent eviction, noted the city had already “made an unprecedented commitment” to providing tenant legal services, referring to the money the city had set aside for tenant legal services. Mr. Banks said his office was “reviewing the impact of the proposed legislation.”

Providing legal representation to all low-income tenants would cost the city about $200 million a year, according to a March report by Stout Risius Ross, an independent advisory firm, for the bar association. But the report contended that the effort would save the city even more than that — over $300 million, annually — by keeping 5,237 families a year out of shelters, at a cost of $43,000 per family, along with other savings, such as through the preservation of rent-regulated affordable housing.