OTTAWA, Jan 16 (Reuters) - Canada's annual inflation rate rose to 3.4% in December from 3.1% in November, data showed on Tuesday, a sign of stubborn inflation ahead of next week's interest rate decision.

The inflation matched estimates by economists polled by Reuters.

On a monthly basis, consumer prices matched expectations as well and fell 0.3% from November.

The annual inflation rate was largely driven by higher gasoline prices last month as compared with the same period a year ago, even though its price fell for four consecutive months, Statistics Canada said.

Excluding gasoline, inflation slowed year over year, from 3.6% in November to 3.5% in December, the agency said.

Price of food purchased from stores rose 4.7% in December, the same annual rate as November.

Excluding energy and food prices, annual inflation rate slowed to 3.4% from 3.5% in November.

One of the Bank of Canada's (BoC's) core measures of underlying inflation, CPI-trim, edged slightly higher to 3.7%, while CPI-median stayed at 3.6%.

The failure of core measures to slow notably is a sign that inflation is likely to come down slowly.

Headline inflation has been higher than 2%, the midpoint of the central bank's 1-3% target range, since March 2021.

The Canadian central bank raised its key policy rate to a 22-year high of 5% between March of 2022 and July of last year to tame inflation.

The central bank's next interest rate announcement is on Jan. 24, when it is expected to keep its key policy rate on hold.

Money markets and economists expect it to start cutting rates in the first half of 2024.

The BoC had previously forecast inflation should hit its target by the end of 2025, but Governor Tiff Macklem - making his last public appearance of 2023 - told reporters it should be closer to the target by the end of this year.

Canada's economy stalled in October. In the fourth quarter, Canadian firms said their order books declined as interest rates crimped consumer spending, and they see inflation easing, according to a BoC survey published on Monday. (Reporting by Promit Mukherjee and Dale Smith in Ottawa; Editing by Ismail Shakil)