The price at the pump was more than $4 a gallon in Vista, Calif., when Scott Hissem recently embarked on a trip to Texas to celebrate his 40th birthday. When the delivery associate for Amazon.com Inc. arrived in the Lone Star state, he got an unexpected present: Gasoline cost just $2 and change.

The gap has Mr. Hissem considering a move to escape California’s high cost of living.

“It makes life hard,” Mr. Hissem said of California, which is the most populous U.S. state and the one with the highest gasoline prices. “You can’t go out and do the things you want to do.”

California Gov. Gavin Newsom asked for an investigation into alleged gasoline-price fixing by big oil companies. Photo: Rich Pedroncelli/Associated Press

Mr. Hissem’s journey highlights an unpleasant truth for many Americans, even at a time of abundant global oil supplies: Regional differences in taxes, environmental rules and access to energy infrastructure can translate into large seasonal swings in gasoline prices.

Prices have surged this fall in California and other West Coast states following outages at several refineries in the region. Analysts said the coast is generally vulnerable because of its limited pipelines and refineries that turn oil into fuel products such as gasoline. Higher gas taxes in some states aiming to fund local infrastructure projects and varying pricing strategies by energy companies also drive gaps.

The volatility isn’t an isolated event. The standard deviation of gas prices—a measure of how much each state’s price varies from the national average—has hit its highest level this year in data going back to 2005, according to price tracker GasBuddy. The figure has risen in each of the past three years.

Refineries often shut down at this time of year because gasoline demand tends to fall seasonally and refiners start making a different grade of gasoline for the winter, but unplanned maintenance issues can roil prices in coastal regions. Prices have surged above $4 a gallon in California and have also climbed nearby in Washington, Oregon and Nevada, though not as drastically.

Areej Aljalabi, a 45-year-old stay-at-home mom who lives in San Diego, said she paid $5 a gallon for gasoline earlier this month and has been trying to limit her driving. That compares with a state average this year of $3.63 and the U.S. average of $2.60, according to GasBuddy.

“I couldn’t believe it,” she said. “It’s affecting me in so many ways.”

Economists are focusing on the cost of gasoline and other core expenses because consumer spending accounts for more than two-thirds of U.S. growth and has helped cushion the world’s largest economy from a slowdown overseas. Data last week showed that retail sales fell unexpectedly in September, a potential warning sign that a key pillar of support for the economy is weakening.

Two gas stations right next door to each other can have different prices for a gallon of gas. WSJ breaks down the different global, national and local factors that affect the price you pay at the pump. Image: Getty

Moves in gasoline prices could also affect expectations for inflation and interest-rate policy. The Federal Reserve is likely next week to lower rates for the third time this year, but central-bank officials are divided on whether further cuts will be necessary in the months ahead.

Economists say the gas-price spikes will likely slow economic activity in affected regions, but that the continued low level of national prices augur continued U.S. expansion.

Crude-oil prices account for about 56% of the cost of regular-grade gasoline, while federal and state taxes represent 17% and refining and distribution make up 13% apiece, according to the Energy Information Administration. A dozen states raised gas taxes earlier this year, including Illinois, Ohio, California, Maryland and Michigan, according to the Institute on Taxation and Economic Policy, a state and federal tax-policy think tank.

Another target for consumer backlash: big energy companies that have generally been under pressure from low commodities prices and geopolitical challenges in recent years. Earlier this week, California Gov. Gavin Newsom asked the state’s attorney general to investigate whether false advertising or price fixing by big oil companies are also contributing to the increase, citing a report by the California Energy Commission.

The report named several higher-priced retail brands, including Chevron Corp. ; 76, owned by Phillips 66 ; and Shell, owned by Royal Dutch Shell PLC.

Catherine Reheis-Boyd, president of the Western States Petroleum Association, said the industry group is reviewing the report and noted that California’s regulations play a large role in the higher prices.

California’s higher emissions standards do limit the number of refineries in the U.S. able to meet its specifications, analysts say.

SHARE YOUR THOUGHTS

Have you noticed a significant change in gas prices in your area? How do you manage the changes within your budget? Join the conversation below.

And the state has a small number of refineries to begin with, said Amy Myers Jaffe, a senior fellow focused on energy and climate change at the Council on Foreign Relations in Washington. She recently served on California’s Petroleum Market Advisory Committee, a group set up by the state’s energy commission to study the topic that published its final report two years ago.

“You have a lot of variation that can come from a combination of bottlenecks and market power” of energy companies, Ms. Myers Jaffe said. She has studied the impact of gas prices on consumer happiness and found that different attitudes about driving regionally also contribute to the pricing gaps and larger swings in consumer sentiment.

“It is the most visible price-change sign in America,” she said.

To receive our Markets newsletter every morning in your inbox, click here.

Write to Amrith Ramkumar at amrith.ramkumar@wsj.com

Copyright ©2019 Dow Jones & Company, Inc. All Rights Reserved. 87990cbe856818d5eddac44c7b1cdeb8