Shares of Apple (AAPL 5.98%) have taken a big hit in recent weeks, pulling back about 9% since Aug. 1. The decline is likely due to a combination of factors, including shares taking a breather after a huge run-up this year and concerns about China's move to ban iPhones at some of its central government agencies.

Is the stock's slide a buying opportunity or a red flag signaling underlying problems that could be bad news for investors? One analyst is telling investors this week that the stock's decline has gone too far, presenting an attractive buying opportunity.

The path to $215

Morgan Stanley analyst Erik Woodring was the market's bold contrarian last week. Following a two-day 6% slide in the iPhone maker's stock as investors worried that the ban of iPhones at some central government agencies could be expanded, the analyst reiterated a $215 price target for the stock and said its pullback on China worries had been overdone.

The timely note to investors is notable both for its contrarian view and the significant upside that's implied by the price target for the tech stock. The $215 12-month price target would translate to a gain of about 20% -- and that would be on top of a 38% year-to-date gain.

To back his contrarian view, Woodring emphasized that the risk of China becoming more nationalistic toward Apple isn't new. Furthermore, the analyst says that banning the iPhone would be an unwise move for the country since Apple's business in the market is central to the country's economy.

Apple's main iPhone supplier, Foxconn, actually earns most of its revenue from assets in China, employing hundreds of thousands of people in the country. In addition, there are about 50 Apple stores in China, located in important areas with high foot traffic.

These facts only scratch the surface of Apple's importance in the country. The company's third-party app store, for instance, supports small businesses all over the world, including developers in China; and its supply chain is sprawling and global, including many different suppliers with employees in China.

Woodring is probably right: A nationwide ban on iPhones in the important market is unlikely. Of course, it's always a risk worth keeping an eye on.

Looking beyond this concern, Morgan Stanley's $215 price target is also based on the analyst's optimistic expectations for the new iPhone models expected to be launched this week. Woodring believes there's pent-up demand for the latest version that could drive a better-than-expected upgrade cycle from consumers.

A premium valuation for a quality company

While Woodring might be the contrarian in the short term, bullishness toward Apple stock is nothing new in the span of the last eight months. Shares have surged this year, crushing the S&P 500's 16% gain by more than 20 percentage points. This means that even after the stock's pullback, it is still trading at a premium price-to-earnings multiple of 30.

But shares are worth paying up for. With a net cash position on its balance sheet of $57 billion, around $100 billion in annual free cash flow, prudent capital allocation, a loyal customer base, and a long history of successfully bringing new products and entirely new product categories to market, Apple is arguably among the most attractive stocks in the S&P 500, despite its already gargantuan size. While there's no way to know where the bottom of this pullback is, shares look like a good long-term investment.