Whole Foods Market Inc. reported a 5.8% increase in quarterly earnings and said its efforts to attract more customers with lower prices and nifty technology are making headway.

The natural- and organic-focused grocery chain has struggled over the past year as mainstream supermarkets like Kroger Co. and Wal-Mart Stores Inc. are selling more natural and organic foods and other high-end supermarkets pop up nationwide. The company was...