More than five million riders crowd into New York City’s subway on an average workday, and officials say some of them are making everybody late.

At the 34th Street-Penn Station stop, Frank Gallagher thrust his foot between the closing doors of an uptown 2 train on a recent morning and wedged his way inside. “I made up my mind I was going to catch that train,” said the 57-year-old entertainment industry union rep. “I’m five minutes late as it is.”

Officials...