NEW DELHI—A new wave of affordable smartphones has brought hundreds of millions of Indians online for the first time, giving them access to better education, jobs and entertainment. But there is one sector that isn’t thrilled with this development: consumer-goods companies.

Nestlé SA, Coca-Cola Co. and others selling consumer products to India’s 1.2 billion people say that as their poorest customers start spending on smartphone data, they have fewer pennies left over for snacks, sodas and shampoo. Most Indians still struggle...