A year ago, Apple Inc. looked to be headed for a prolonged slump. Chief Executive Tim Cook slashed guidance because of sluggish iPhone sales and analysts fretted over slowing demand in China.

But instead of a slump, investors got one of the biggest one-year stock rallies in history. The tech giant’s share price has more than doubled, adding over $725 billion to its value, more than JPMorgan Chase & Co. and Exxon Mobil Corp. combined—and well above the total value of Facebook Inc.

...