Apple Inc. posted its first back-to-back drop in quarterly sales and profit in more than two years, but the tech titan reported strength beyond its struggling iPhone business and said a sharp downturn in China showed signs of easing.

Profit dropped 16% to $11.56 billion for the three months through March 30, while revenue slid 5% to $58.02 billion, Apple said Tuesday.

Sales...