Amazon.com Inc. is planning to open dozens of grocery stores in several major U.S. cities, according to people familiar with the matter, as the retail giant looks to broaden its reach in the food business and touch more aspects of consumers’ lives.

The company plans to open its first outlet, in Los Angeles, as early as the end of the year, one person said. Amazon has already signed leases for at least two other grocery locations with openings planned for early next year, this person said, without saying where those stores...