It was only a couple of years ago that Whole Foods was struggling to find its footing. The chain was hobbled by a high-priced image just as the recession was raging, all of which severely hurt financial performance and the retailer’s stock price.

Today things couldn’t be more different. In the latest two quarters ended January 16, sales rose 14.2% and operating income soared 46.5% as the company’s generally more affluent customers realized increased spending power. These gains, and lifts in identical-store sales, outpaced those of top public supermarket companies, SN’s data shows. Whole Foods is back in favor on Wall Street, and financial analysts are so pleased that one titled a February report on the chain, “Like the Good Old Days, Only Better.” Another used the headline, “Firing on All Cylinders.”

“Its [Whole Foods’] customers benefited from the recovery of the equity market, which affected their net worth in a positive way,” Chuck Cerankosky, an analyst with Cleveland-based Northcoast Research, said in this week’s SN story.

Whole Foods’ reversal of fortune, however, was due to more than just external factors. The chain’s executives successfully created a large range of new value options over a two-year period and re-energized its core mission.

“It’s been able to win back many customers it lost in the downturn … as it has moved away from gourmet back to its roots, which is healthy foods,” said Karen Short, an analyst with BMO Capital, New York, in this week’s article.

Interestingly, Whole Foods isn’t the only chain benefiting from a more upscale clientele. Another one is Harris Teeter, which posted gains in sales of 9.3% and operating income of 9.6% in the latest two quarters ended Jan. 2. That chain draws customers with higher than average incomes who are benefiting from the recovery.

There’s no guarantee the positive momentum will continue for Whole Foods, but it’s likely to maintain for some time because its customers are benefiting faster from economic rebound.

Moreover, Whole Foods (like Harris Teeter) has been rapidly opening new stores, which should position the chain well as recovery builds. This is a positive strategy for Whole Foods, but it needs to be done “in a way that’s not dilutive to results,” said Andrew Wolf, managing director, BB&T Capital Markets, Richmond, Va.

Meanwhile, the performance gap between Whole Foods and supermarket chains could widen if supermarket shoppers balk at paying higher prices resulting from cost inflation. The Whole Foods clientele is less likely to show that resistance.