“What these numbers say is that California is crucial to U.S. growth, far beyond what we could expect from our population alone,” said Stephen Levy, director and senior economist of the Center for Continuing Study of the California Economy in Palo Alto.

California was hit hard by the housing bust and recession, so it makes sense that the state would have a stronger rebound. But it also shows how the recovery has been guided by what Mr. Levy calls “the three Ts,” which are technology, trade and tourism.

San Francisco and the Silicon Valley have had a yearslong boom, while the Ports of Los Angeles and Long Beach have been at the center of a rebound in container traffic and international trade. Hollywood has done well, too: As cable channels and companies like Netflix and Amazon have ramped up their original programming, Southern California has seen a surge in production jobs.

The downside to all this success is that the state now has quite a lot to lose. With a large immigrant population and a huge port complex, California is at a much greater risk of being hurt by President Trump’s muscular immigration policies and desire to curb imports and tear up trade agreements.