Emergency departments across the U.S. have been slammed in recent weeks by an onslaught of flu visits, forcing hospitals to devise new spaces to house patients, to restrict visitors and to postpone elective surgeries.

Visits to hospital emergency departments, urgent care centers and other outpatient clinics by people with flu symptoms have been skyrocketing for several weeks. As of mid-January, such visits had surpassed every flu season except 2009-10, when a new flu strain caused a global pandemic. The dominant strain this...