San Francisco was once known for trendy restaurants with lines out the door. Today, the city’s restaurateurs are concerned with keeping their doors open at all. Restaurant closings outpace openings by 9%, according to Yelp data analyzed by the Golden Gate Restaurant Association. In a recent meeting with the Board of Supervisors, one industry veteran said: “We need to do something now, or we will be gone.”

How did the outlook for a top restaurant city get so bleak? As Hemingway wrote of bankruptcy, it happened “gradually and...