Just three months ago, shares of Chipotle Mexican Grill (CMG 0.17%) took a beating after reporting first-quarter earnings, despite posting a double-digit comparable-restaurant sales gain. Investors were apparently spooked by rising food costs, which were starting to cut into Chipotle's legendary high margins.

CMG Chart

Chipotle Price Chart, data by YCharts.

The recent margin worries represented the second major round of investor hand-wringing in recent years. The first came two years ago, when hedge-fund manager David Einhorn argued that Yum! Brands (YUM 0.03%) was about to disrupt Chipotle with its lower-priced "Cantina Bell" menu at Taco Bell.

Chipotle put this new set of investor concerns to rest on Monday afternoon, reporting stellar Q2 results. Customers are visiting Chipotle in record numbers, despite its recent round of menu price increases. Meanwhile, these menu price increases are poised to drive a return to margin growth.

Another phenomenal quarter
In Q2, Chipotle's comparable-restaurant sales soared by 17.3%. (By contrast, Yum! Brands recently reported a 2% increase in Taco Bell's U.S. same-store sales.) Chipotle got a 2.5-percentage-point lift from its recent price increases, but the vast majority of its comparable-restaurant sales growth came from serving more customers.

Chipotle posted phenomenal sales and earnings growth for Q2.

Total revenue rose 28.6%, pushing Chipotle past the $1 billion mark for the first time ever, with sales of $1.05 billion. Chipotle's strong sales momentum catalyzed a 24% increase in EPS to $3.50. Chipotle's revenue and EPS for Q2 sailed well past the average analyst estimates for revenue of $989 million and EPS of $3.08.

Skeptics are running out of criticism
Chipotle expects to continue its recent trend of outperformance throughout 2014. In April, Chipotle projected that comparable-restaurant sales would rise at a high-single-digit rate for the full year, excluding the impact of menu price increases. Including the expected price increases, this would have translated to a low-teens growth rate.

On Monday, Chipotle revised its guidance higher, and it now expects mid-teens comparable-restaurant sales growth this year. This reflects both stronger-than-expected traffic trends and a 6.25%-6.5% price increase -- higher than initially planned.

This is a big reversal from early 2013, when comparable-restaurant sales growth slowed to just 1.0%. Chipotle's return to robust comparable-restaurant sales growth shows that Yum! Brands' Cantina Bell rollout was not much of a threat after all. David Einhorn finally recognized this earlier in 2014 and closed his Chipotle short at a loss.

Taco Bell's Cantina Bell menu hasn't hurt Chipotle at all.

Yum! Brands continues to court a more upscale clientele with new menu offerings at Taco Bell. But if anything, these will expand the market for higher-end fast food rather than taking business away from Chipotle.

Plenty of room for growth ahead
Chipotle should continue to post double-digit comparable-store sales growth at least until mid-2015 as the impact of its recent price increase flows through its results. The good times should last beyond then, though.

On the Q2 conference call, Chipotle co-CEO Monty Moran reiterated that the company's original long-term forecast that it could open 4,000 Chipotle restaurants in the U.S. may be conservative. While he wouldn't quantify a new forecast, he pointed to Chipotle's strong results across the country -- even in markets that didn't look too good a few years ago.

Chipotle is also experimenting with new restaurant concepts, such as ShopHouse Southeast Asian Kitchen and Pizzeria Locale. It has also opened a handful of restaurants in Canada and Europe.

The combination of growing Chipotle in the U.S., expanding internationally, and adding new restaurant concepts represents a huge long-term opportunity. In the long run -- i.e., 40 to 50 years from now -- Chipotle could potentially operate tens of thousands of restaurants globally, similar to other top fast-food chains.

Foolish bottom line
Chipotle has provided huge gains for early investors, but its momentum keeps growing. Its double-digit comparable-store sales growth demonstrates that demand for its food keeps rising, and that competing concepts from the likes of Yum! Brands are not a serious threat.

Even though Chipotle shares rocketed to a new all-time high on Tuesday, there is still plenty of long-term upside in light of the company's growth potential. Investors shouldn't be frightened away by the high earnings multiple; Chipotle has a proven, highly profitable model, and a big runway for growth.