The Bay Area outpaced the rest of the state and the country in economic growth for at least the fifth consecutive year, according to data from the U.S. Bureau of Economic Analysis.

The San Jose-Sunnyvale-Santa Clara metropolitan area’s gross domestic product increased by 8.9 percent between 2014 and 2015, making it the second-fastest-growing metro area in the country behind only Midland, Texas. In the same period, the economy of the San Francisco metropolitan area, which includes Alameda, Contra Costa, Marin and San Mateo counties, increased by 4.1 percent. The average U.S. metro area grew at a 2.5 percent rate in 2015.

The continued growth of technology companies in the South Bay made a large contribution to the region’s $223 billion GDP in 2015, said Micah Weinberg, president of the Bay Area Council’s Economic Institute.

While so-called unicorn startups make waves for the multibillion-dollar valuations investors place on them, GDP is measured more conventionally, through sales of products and services. So it’s the more established companies like Apple, Google, Facebook and Salesforce that make a significant mark on the region’s economy.

“There are footprints of all major industry sectors in the Bay Area, but tech is the big kahuna,” Weinberg said.

Silicon Valley is also a draw for companies around the world, whose outposts generate local economic activity.

Just last year, Samsung opened a 1.1 million-square-foot, 10-story research-and-development center with 700 employees in San Jose. In June, Sunnyvale’s City Council approved plans for the construction of five new office buildings in Moffett Park, where Amazon, Microsoft and Comcast have expanded their presence.

Access to engineering talent from Stanford University and other local colleges, proximity to venture capitalists and even the weather draw global interest in the area, said Matthew Mahood, president and CEO of the San Jose Silicon Valley Chamber of Commerce.

“There is really only one Silicon Valley,” Mahood said.

Despite the growth of companies like Twitter and Uber, San Francisco has a way to go before competing with the established tech businesses of the South Bay, and the city’s finance sector has shrunk over the decades, said UC Berkeley Professor Karen Chapple, who teaches regional planning and economic development.

“You either want to follow a path toward diversity or follow a path toward specialization, and San Francisco hasn’t quite been able to do either,” Chapple said.

Still, the Bay Area remains the envy of the world. Silicon Valley even beat China’s 2015 growth rate of 6.9 percent.

Its growth goes against economic principles that mark high living costs as a barrier to economic growth, according to Chapple. That Bay Area companies compete both on quality of products and innovation as opposed to quantity gives the region a huge advantage, she said.

“The irony is we’re creating these tools in the Bay Area that would seem to make geography irrelevant, but being geographically in the Bay Area has never been more relevant,” Weinberg said. “It’s actually mystifying.”

The concentrated growth brings its own problems, he said.

“There are many places in California that have actually been sliding backwards, the Central Valley for example,” said Weinberg. “It’s not sharing in the economic success. ... If you take the Bay Area out of California, it’s doing just OK.”

“It’s exacerbating income inequality to the extent that it’s basically two different economies in the U.S.,” said Chapple. “It’s harder and harder to have economic development in the places getting left behind.”

Jessica Floum is a San Francisco Chronicle staff writer. Email: jfloum@sfchronicle.com

Twitter: @jfloum.