A trader works next to a Grubhub Inc. paper bag on the floor of the New York Stock Exchange (NYSE) in New York.

Terry downgraded GrubHub to neutral from buy and slashed its 12-month price target to $30 from $86. Shares of GrubHub cratered 43% on Tuesday to $33.11 after reporting disappointing third-quarter earnings and giving fourth-quarter guidance well below Wall Street's expectations. The stock rebounded slightly Wednesday and was up more than 7% in midmorning trading.

"We got this wrong," said Goldman Sachs analyst Heath Terry in a note to clients on Wednesday.

After a more than 40% plunge on Tuesday, Goldman Sachs said it can no longer recommend buying food delivery service GrubHub .

Not only did Goldman have a buy rating on the food delivery company, but the firm had the company on a list of its favorite stocks, its Amercias buy list. To be fair to Goldman, the stock is about flat since the firm first added it to the list in 2014.

"We signiﬁcantly underestimated the impact of competitor investments on customer behavior across the space while overestimating both the potential for industry-wide growth and Grubhub's ability to maintain share," Terry wrote.

GrubHub earnings fell short as competition in the food delivery space forces the embattled stock to spend heavily despite losing more than half its value this year. The weak results caused analysts to rethink their ratings, and five firms downgraded GrubHub on Tuesday, including two firms that double downgraded the stock.

GrubHub is honing in on restaurant partnerships and investing heavily in technology. Terry said he believes Grubhub is making the right long-term decisions for the business, but the shares may struggle some more.

"We believe the likelihood of near-term outperformance as management implements this new strategy is low given the high degree of uncertainty and competition," said Terry.

Goldman revised its 2019, 2020 and 2021 earnings and revenue estimates down 53% and 14%, respectively, each year on average, "to reﬂect the net impact of Grubhub's outlined strategic shift as well as more recent order trends," said Terry.

— With reporting from CNBC's Michael Bloom.