TORONTO -- The risk of inflation becoming entrenched in Canada's economy is growing, say analysts, as surging prices for gas and other highly visible consumer items undercut efforts by the Bank of Canada to keep expectations for price increases in check.

Once inflation gets built into an economy it tends to become more difficult to bring under control without triggering an economic slowdown, or even a recession.

Canada's consumer price index data for May, due on Wednesday, which will include new basket weights that are unlikely to have a major impact, is expected to show inflation climbing above April's three-decade-high of 6.8 per cent.

What central banks dread is a situation in which price increases become self-fulfilling - expectations for higher prices cause people to raise wage demands and accelerate purchases, driving further price increases.

The Bank of Canada is fighting a "battle" to control inflation expectation, said Derek Holt, head of capital markets economics at Scotiabank, who projects a 7.8 per cent rate of growth for May CPI.

"They missed their chance to nip it in the bud and now you've got consumers and businesses who aren't fussing over what's driving it. They are engaged in extrapolative behavior, which is the path central banks always want to avoid."

As in other countries, much of the reason for soaring prices comes from supply constraints related to the COVID-19 pandemic and the war in Ukraine. But as inflation lingers, expectations that price pressures will continue have climbed.

A Conference Board of Canada survey for May shows that 78 per cent of Canadians expect inflation to exceed the BoC's target of two per cent over the next three years, up from 77 per cent in April.

Investors have taken note, betting that the central bank will match the Federal Reserve's recent three-quarter-percentage-point rate increase when it next meets on July 13, which would be the biggest hike in 24 years.

The threat of unmoored inflation expectations comes as Canadian gas prices climbed in June to a record high of $2.15 a litre.

"Central bankers can't be too happy with what's happening at the gas pumps, since it's one of the prices that households most closely track, and along with some other staples like milk and bread, has more influence over perceptions of inflation than its actual weight in the consumer basket," said Avery Shenfeld, chief economist at CIBC Capital Markets.

To keep expectations anchored while it unwinds stimulus in an overheating economy, the BoC has taken the rare step of providing guidance on the path of rates, saying they could move above the top of the two to three per cent neutral range.

On July 4 the central bank is due to release its quarterly surveys of businesses and households, which includes measures of their inflation outlook.

"I think the surveys will keep pushing up," Holt said. "It's a faster and steeper pace of rate hikes in order to correct those expectations."