HONG KONG—iPhone shipments in China slumped far more than overall smartphone shipments there last quarter, costing Apple Inc. further ground against local rival Huawei Technologies Co. in the world’s biggest smartphone market.

Apple’s smartphone shipments in China in the last three months of 2018 were down 20% from a year earlier, according to International Data Corp., putting a finer point on Apple’s shrinking sales in China late last year. Last month, Apple CEO Tim Cook blamed declining iPhone sales in China on the economic...