The healthcare industry has done extremely well in 2018, and many companies in the space have posted stellar gains. That makes the lackluster gains that industry giant Johnson & Johnson (JNJ 0.82%) has achieved so far this year somewhat disappointing for shareholders, especially given that the company is still seeing considerable growth from its pharmaceutical segment and is also mounting comebacks in other areas of its business.

Johnson & Johnson's size makes it more difficult for the healthcare giant to respond quickly to changing trends in the industry, and throughout much of 2018, investors seemed to prefer faster-growing companies with clearer future prospects. Yet as the year has gone on, shareholders have appreciated J&J's solid customer base, and that could bode well for the rest of the year and beyond.

JNJ Chart

JNJ data by YCharts.

An up-and-down year

Johnson & Johnson entered 2018 with investors looking forward to continued success. With a 25% rise in 2017, the healthcare conglomerate had proven its ability to weather storms from drugs that had gone over the patent cliff. Moreover, key acquisitions like Actelion and Abbott Medical Optics helped contribute to overall growth, and despite early results that included a huge one-time hit due to changes in tax laws, J&J seemed to get off on the right foot to start the year.

Yet a broader correction in early 2018 showed Johnson & Johnson's vulnerability to adverse stock market conditions. Even results in the first quarter that included strong revenue gains for key treatments like Zytiga and Stelara weren't enough to get the stock price moving in the right direction. Slow growth in the medical device and consumer segments highlighted just how focused J&J had gotten on pharmaceuticals, and many feared that continued weakness in those ancillary segments could weigh on the entire company's performance throughout the year.

Stats on Johnson & Johnson

Revenue, Past 12 Months

$81.38 billion

1-Year Revenue Growth

9.4%

Net Income, Past 12 Months

$1.54 billion

1-Year Net Income Growth

(90%)

Source: Johnson & Johnson.

How J&J powered a rebound

Later in the year, though, Johnson & Johnson bounced back. The company's second-quarter results showed ongoing demand increases for its key drugs. Even though biosimilar competition for J&J's best-selling Remicade weighed on overall gains, the company's other treatments picked up the slack, producing double-digit sales growth during the quarter.

The most recent quarter brought even better news for the healthcare giant. Organic growth of 5.5% systemwide showed the health of the company's overall business, and particularly noteworthy was J&J's 7% jump in domestic sales in its consumer products division. Despite ongoing challenges in producing livelier results in medical devices, Johnson & Johnson managed to find pockets of strength in areas like vision and surgical devices. The company took the opportunity to boost its sales and earnings guidance for the remainder of the year, and that reassured investors who'd worried about J&J's ability to deliver good results.

Old-style advertisement for Johnson's digestive tablets, with picture of bottle and description.

Image source: Johnson & Johnson.

Can Johnson & Johnson keep getting better?

Some of the gains that Johnson & Johnson has seen in its stock price recently are also probably related to the overall conditions of the market. When volatility strikes, interest in defensive stocks like J&J rises, as most see the consumer health business as being resistant to economic downturns. A long streak of dividend growth also encourages nervous investors, and a dividend yield approaching 2.5% provides some solid income for shareholders who seek protection from any further market declines.

Some of the best opportunities that J&J has are in oncology. Darzalex and Imbruvica have managed to expand their indications beyond their initial approvals from the U.S. Food and Drug Administration, and that's helped to power their sales higher at a time when the company really needed strong contributions from their rising treatments. Prostate cancer drug Erleada is a new entrant to the J&J stable of approved drugs, but it's already showing considerable promise, and investors hope that it too could see further expansion along with other promising treatments still in the pipeline.

Bullish investors might be frustrated with Johnson & Johnson's minimal gains so far in 2018, especially after 2017's strong performance. Yet with so much going well for the healthcare giant, all it might take is for the stock market to get on a more solid footing for those following J&J to realize the opportunities the company has to grow.