Much of the American workplace has shut down, sending millions of employees home to wait out the coronavirus pandemic.

Among those still on the job are grocery-store clerks, prison guards and delivery drivers. “Who would have ever thought that we would be on the front lines?” said Joyce Babineau, a 67-year-old supermarket supervisor in Dartmouth, Mass., a coastal village 60 miles south of Boston.

Ms. Babineau is in one of the groups deemed essential—men and women who carry on even as cities and communities shut down around them.

Workers from New Hampshire to California say they feel both duty and dread. They’re also glad to still be working. On every shift, they tend to basic needs in an unfolding disaster likely to be prolonged, widespread and perilous.

Household essentials

Ms. Babineau was up at 5:30 a.m. Wednesday and packed her usual lunch of a half sandwich and piece of fruit. She put on her Stop & Shop windbreaker and grabbed a box of 100 rubber gloves.