Is there anything Bill de Blasio can do to make the city affordable again? Maybe. But we have to want to pay for it.

In 1890, the richest one percent of Americans were wealthier than the other 99 percent combined, but the disparities were gravest in New York City. At all ­levels—civic, moral, ­sanitary—the urgency of the problem was obvious, and from around the United States talented young people arrived to try to do what they could to fix it: professors from Indiana, doctors from Connecticut, nurses from upstate New York. The social sciences were then still fairly new, and the conviction they carried, that through careful study and experimentation society could be improved, still held a thrill. The obvious laboratory was the Lower East Side’s immigrant Tenth Ward—the Typhus Ward, the Suicide Ward, by the reckoning of one prominent historian the most crowded neighborhood in the world, and soon also arguably the most studied. Harlem before Harlem, Bed-Stuy before Bed-Stuy.

These laboratories often took the physical form of settlement houses, tenements where young, well-intentioned children of the American elite would live alongside the immigrant poor, hoping to study them and build institutions that might improve their lives. “In our rooms, it seemed as if we were back in college again,” wrote Jane Robbins, a recent Smith graduate, of the dozen other residents on her floor on Forsyth Street. Their reports were memorably, often dramatically, grim: “They pant for air, and perspiration that drops from their foreheads is like lifeblood, but they toil on steadily, wearily, except when now and again one, crazed by heat, hangs himself to a door jamb.” Robbins and her peers were scrupulous social scientists; they monitored gang wars and ran education and comportment classes for young men and women. Throughout the settlement-house movement, there were wrong turns into cultural condescension, but there were also formal links to the great universities of the day, and a mania for measurement. You can just about see the call-and-response rhythm of modern liberalism being built: the almost theological declaration of injustice, the scientific optimism that society could be fixed. “There is already room,” wrote Stanton Coit, the young Amherst graduate who founded University Settlement, the city’s first settlement house, “to lay at least the foundations for the New and Perfect City.”

We don’t talk about perfect anymore. What we talk about is affordability—what kind of life an ordinary person can buy. In New York, where the pressures of real estate are, shall we say, unique, the subject is manifestly physical. Often it feels like this city really has only two classes: those who believe they can afford the space they need to live in and those who believe they can’t.

The city has gotten steadily wealthier throughout the past generation, but over the last decade the change has been exceptional. And during these most recent few years the population of that second group—those who feel they just can’t afford to live in their own city—has swelled, so that it is now thick with members it would have only recently considered enemies: attorneys, doctors, liberal artists. Bill de Blasio’s campaign, rich as it was in the rhetoric of economic populism—in its reminder of the “nearly half of our neighbors who live beneath the poverty line,” in its conjuring of a spectral, sprawling Brownsville of the mind—was a movement that assembled not only the poor, but also the middle class and alienated professionals. He spoke to the anxiety of not being able to afford a rent increase; to those who feel increasingly priced out of much of the city; to those who can’t afford pre-K for their children and worry about the inadequacies of the public schools and the hospitals. The advance through the city’s residential neighborhoods of young millionaires from the financial industry, and the intrusion of global financial capital in the form of pieds-à-terre, has seemed relentless. Proximity, the great economic genius of middle-class cities, no longer looks like a method of collective uplift so much as a theater of envy, in which everything we could possibly want is there to desire, but still just out of reach.

Part of De Blasio’s appeal has been his artful use of an extended historical analogy, in which he cites Dickens and suggests we are living in a second Gilded Age. “Salient elements in De Blasio’s 21st-century agenda,” says John Recchiuti, a historian of progressive reform, “were at the center of progressive New Yorkers’ political activism exactly 100 years ago.” This has been a deft political gesture, capturing the alienation that even many middle-class New Yorkers feel. But it is also a way of summoning political will. To raise the specter of the Gilded Age is not only to remind New Yorkers of how inequality once broke New York. It is also to remember how, afterward, the city was fixed.