The Angels selected Gatto with the 53d overall pick in the first-year player draft.
"It's amazing just to think that we're from the same area, the same league," Gatto said. "It says a lot about South Jersey and the Cape Atlantic League."
Trout tweeted congratulations to Gatto soon after the selection, telling him to "represent S.J."
Said Gatto: "It's unbelievable that he did that."
Gatto played in the same division in the same league as Trout did during his career at Millville. Gatto was 7-1 with a 0.94 ERA as a senior for St. Augustine, which won the Cape American title - beating Millville twice.
"It's great," Millville coach Roy Hallenbeck said of Gatto's being selected by Trout's team. "I saw that Mike and Joey tweeted each other. Pretty cool."
Trout was selected by the Angels with the 25th pick in 2009. He rocketed through the minor leagues and is widely regarded as one of the best all-around players in baseball.
Angels scouting director Ric Wilson spoke of Gatto's potential to reporters in Los Angeles on Thursday night.
"He's a high-ceiling righthander with really long limbs and a powerful body," Wilson said of the 6-foot-5, 215-pound Gatto.
Several local players and college players with local ties were chosen Friday, the middle day of the three-day draft.
Holy Cross graduate Mark Zagunis, a junior catcher at Virginia Tech, was selected by the Chicago Cubs in the third round, 78th overall. Zagunis hit .330 for the Hokies this season.
Florence graduate Heath Fillmyer, a sophomore righthander at Mercer County College, was taken by the Oakland A's in the fifth round, 162d overall.
"I thought it was a typo, like it was supposed to be somebody else's name," Fillmyer said.
He was 9-0 with 95 strikeouts in 69 innings last season. He said he plans to sign and "get started on my career."
Two picks after Fillmyer, hard-hitting Neumann-Goretti first baseman Josh Ockimey was selected by the Boston Red Sox.
After the school's graduation ceremony, Ockimey learned of his selection while listening to a live stream of the draft in the car.
"To hear my name, I can't even describe the feeling," he said. "It was such a great thing."
The 6-foot-3, 225-pounder said he had worked out for the Red Sox last Sunday at Fenway Park. His batting-practice session against live pitching included about 24 swings.
"I did pretty well, hit one out," he said. "I thought they were really impressed. Afterward, they said, 'We've seen enough. You'll find out Friday or Saturday.' "
Ockimey, who last fall committed to Indiana, is hitting .493 with 32 RBIs and 29 runs this season.
St. Joe's junior catcher Brian O'Keefe, selected by the Cardinals in the seventh round with the 225th pick, became the first of three local collegians picked Friday. A native of Albany, N.Y., O'Keefe became the highest draft pick out of St. Joe's since the Chicago Cubs used a 1984 sixth-round pick on pitcher Jamie Moyer.
Not long after O'Keefe was tabbed, the Milwaukee Brewers snatched Villanova righthanded power-pitcher J.B. Kole in the eighth round with the 236th pick. One round later, the Phillies plucked Temple pitcher Matt Hockenberry with the 262d choice.
Rutgers senior first baseman Brian O'Grady, a 2010 Archbishop Wood graduate, went to the Cincinnati Reds, also in the eighth round (245th overall).
Inquirer staff writer John Mitchell contributed to this article.