The Scottish Retail Consortium (SRC) and accountants KPMG found total sales in December increased year-on-year by 0.7%.
It was the strongest rise since January 2014.
Grocery sales were 2.5% up on December 2015, which the SRC said was the best performance in more than three years.
In non-food, there was a slight decline in store sales, but online purchases lifted the category into growth.
There were good sales of mid-priced items, with fragrance and mobile phone gifts performing well.
Online sales of home accessories, beauty products and toys were also strong.
Ewan MacDonald-Russell, SRC's head of policy and external affairs, said food sales had been driven by a late surge in customers stocking up for Christmas.
He said: "It's encouraging to see another good month's performance, which builds on a good November and continues the autumn trend of a small but now sustained recovery in retail sales."
Although Christmas provided a boost for Scottish retailers, analysts warned that economic indicators suggested inflation was affecting costs for businesses.
They also said inflation was beginning to feed through to the high street, and both customers and retailers were likely to feel the squeeze over the early months of 2017.
Craig Cavin, head of retail in Scotland at KPMG, said there was a significant increase in both online and high street sales in December, but uncertainty over Brexit could result in rises in food prices.
He said: "With price increases likely over the coming year, consumers were happy to make the most of the festive discounts."
Strong food sales gave Scottish retailers a boost over the vital Christmas period, according to a report.