Amazon.com Inc. plans to offer same-day grocery delivery in 2,300 cities by the end of the year, more than doubling the current number and marking its latest attempt to muscle into the $1 trillion grocery industry led by its top retail competitor Walmart Inc.