Piatti made it 2-0 in the 32nd minute with a chip shot finish from another long ball.
Former England midfielder Lampard energized the sellout crowd at Yankee Stadium when he entered as a substitute in the 69th minute, immediately after a David Villa penalty narrowed City's deficit to 2-1.
Piatti's scored from the penalty spot in the 84th minute before Thomas McNamara quickly answered for City 85th.
In Washington, Perry Kitchen scored in the in the 79th minute to give DC United a 6-4 win over Real Salt Lake.
The 10 goals fell one short of the MLS single-game record. The teams combined for seven goals in the second half, one short of the record for most goals in a half.
Former Norway defender Pa-Modou Kah scored two rare goals to lead the Vancouver Whitecaps to a 3-0 victory over the Seattle Sounders.
Kah volleyed his first goal past goal Sounders 'keeper Stefan Frei in the sixth minute off a scramble in the area. He added a second in the opening moments of the second half, redirecting Cristian Techera's shot with a deft back-heel. Kah entered the match with one career MLS goal in 57 games.
Pedro Morales added his fourth goal of the season in the 75th minute with a curling free kick.
In other games, Charlie Davies scored twice and Lee Nguyen added a penalty as the New England Revolution beat a 10-man Toronto FC 3-0, Robbie Keane scored in stoppage time to lead the Los Angeles Galaxy past the Colorado Rapids 3-1, Cyle Larin's double helped Orlando City to a 5-1 win over the Columbus Crew and the Houston Dynamo drew 1-1 with Sporting Kansas City.