Marking a rare stumble, Apple Inc. on Friday revealed it missed its own annual sales and profit goals for the first time since 2009, putting a dent in Chief Executive Tim Cook’s annual paycheck and pressuring the company to deliver a blockbuster with its next iPhone.

Apple fell short of its own projections in part because it mistakenly assumed consumers’ appetite for the iPhone 6S, introduced in 2015, would outpace demand for the predecessor device. The Apple Watch, introduced in 2015, and services including Apple Music,...