Holly Gambal lay frozen on the floor of the train, unable to move or cry out for help.

She was living in New York City’s subway system — and had been for many weeks — the night in 2014 that she had a stroke at the 95th Street station in Bay Ridge, Brooklyn.

“I was standing, but I collapsed, and I was like a newborn,” Ms. Gambal, 43, said recently. “I couldn’t articulate any words.”

Ms. Gambal, who had no insurance, was taken in an ambulance to a nearby hospital. When she was released about three months later, she was directed to a nearby nursing home. But off her medication for bipolar disorder and unwilling to accept help, she returned to the streets.

“I would just go anywhere,” Ms. Gambal said. “In the winter, I would try to find someplace warm or I slept on the train. It was a really lost time for me.”