Atop a 20 foot ladder inside a New York City subway tunnel on a recent weeknight, a worker plunged a drill with a bit as long as a sword deep into a wet wall. Pulverized stone showered onto the third rail below, before the worker plugged the fresh hole with a length of rubber hose. At his signal, workers on the ground squirted gallons of grout through the hose and deep into the wall, until it hit unseen water and the grout burbled out like ectoplasm and slid down toward the track.

One leak plugged. Untold thousands to go.

Many of the now familiar tribulations of the city’s subway system are self-inflicted: Chronic delays and overcrowding are rooted in a history of mismanagement by officials and elected leaders who have long neglected repairs and updates to a century-old system, where aging cars run on worn-out tracks and are controlled by antiquated signals. Last year, Gov. Andrew M. Cuomo said over $800 million would be invested in a subway emergency plan to turn around the beleaguered system.

While a significant portion of that plan is focused on the subway’s brittle infrastructure, money is also being used to help the system fight a force not entirely under its control: water, 13 million gallons of which is pumped out on a regular dry day, according to the Metropolitan Transportation Authority, which oversees the subway system.