In a poignant moment in the hit Broadway musical about Alexander Hamilton, his widow Eliza sings that her proudest accomplishment was starting the first private orphanage in New York City.

Since opening in 1806, that refuge for 16 orphans has grown into a sprawling social-service agency called Graham Windham. Providing foster care, a therapeutic school and counseling that tries to keep fragile families together, the agency serves more than 4,000 of the city’s most vulnerable children.

Leaders...