Union scored first-half goals from Alejandro Bedoya and Daniel Gazdag, while Sergio Santos had a goal disallowed on the stroke of half-time, as Philadelphia got some revenge after last season's Eastern Conference final defeat to City.
Bedoya put Philadelphia ahead in the 12th minute, but City thought they had an avenue back into the game when referee Ted Unkel awarded them a penalty and sent off Jack Elliott for a 28th-minute last-man push on Santiago Rodriguez.
However, VAR intervened and determined that Rodriguez had illegally used his hand in the lead-up, meaning the penalty and red card were overturned.
The win was Philadephia's first at Yankee Stadium and came despite City bossing the possession count with 74 percent.
Former Liverpool and Bayern Munich attacker Xherdan Shaqiri netted his first MLS goal as Chicago Fire won 3-1 over Sporting KC.
Shaqiri scored from the spot in the 50th minute to make it 2-0 as Chicago extended its unbeaten start to the new season with Kacper Przybylko hitting a double.
Jesus Ferreira scored a first-half hat-trick as Dallas defeated Portland Timbers 4-1 in a sign of intent for the forward ahead of USA's upcoming World Cup qualifiers.
All three of Ferreira's goals came in a 10-minute span, marking his first-ever MLS hat-trick.
Gonzalo Higuain scored, but Inter Miami remain winless this term after a 3-1 loss away to last season's strugglers Cincinnati.
The result leaves Phil Neville's side with an MLS-worst record of one point from four games, having conceded 10 goals and only scored two.
Karol Swiderski netted a double as Charlotte upset New England Revolution 3-1, while Luis Amarilla's 32nd-minute strike lifted Western Conference leaders Minnesota United past San Jose Earthquakes 1-0.
Tyler Pasher's 90th minute goal salvaged a 1-1 home draw for Houston Dynamo against Colorado Rapids, while 10-man Atlanta United scored twice in the final five minutes to rescue a 3-3 draw with Montreal.
Facundo Torres' early goal got Orlando City past LA Galaxy 1-0, Bob Bradley's Toronto knocked off DC United 2-1 and Real Salt Lake edge 10-man Nashville 2-1.
Australian full-back Brad Smith provided an assist for Ruidiaz's 20th-minute opener, before scoring a goal himself three minutes later, forcing home a rebound.
Ruidiaz settled the contest in second-half stoppage time when he fired home on his left foot from substitute Jimmy Medranda's low cross.
The Sounders dulled the threat of Galaxy forward Javier 'Chicharito' Hernandez – who had scored five goals in his opening two games – in a strong display, where they marginally lost possession but had nine to two shots on target.
The win moves Seattle to seven points from three games to start the new campaign, while the Galaxy suffered their first blemish of the campaign after scoring six goals in their opening two games.
Inter Miami drew a blank in the absence of the Higuain brothers with a 0-0 draw away to Nashville.
Former Juventus and Real Madrid forward Gonzalo Higuain and brother Federico were unavailable for the match after flying back to their native Argentina following the death of their mother to cancer.
The Higuain brothers' team-mates offered a wonderful sign of support ahead of the game.
Inter Miami – co-owned by former Manchester United, Madrid and England star David Beckham – have four points from three games, while Nashville are still winless but have drawn all three matches this season.
Diego Rubio's incredible free-kick helped Colorado Rapids to a 1-0 victory away to Vancouver Whitecaps.
Rubio struck in the 26th minute with a curling right-foot shot that found the top corner, going in off the post and crossbar.
The spectacular strike earned the Rapids their first three points of the season, while condemning the Whitecaps to their first defeat.
The Sounders remain undefeated through six matches this season thanks to a two-goal second half at Lumen Field in Seattle.
Entering the contest, Seattle had 13 points from their first five matches for the second time in the last three seasons – the only team in the last 20 seasons to have at least 13 points after five games more than once.
The Sounders stayed hot courtesy of Xavier Arreaga and Brad Smith – the former opening the scoring in the 57th minute.
Smith doubled the lead with 17 minutes remaining when the Australian full-back pounced for his third goal of the season.
The Sounders are four points clear of LA Galaxy in the Western Conference, while Sporting Kansas City are a point further back in third following their 3-0 win over Vancouver Whitecaps.
LAFC are bottom of the west with five points from five matches in 2021.
Former Juventus and Real Madrid forward Higuain was the hero for Inter Miami, who prevailed 3-2 in a thriller at Cincinnati.
Higuain scored the winning goal five minutes from the end after Cincinnati's Nick Hagglund has restored parity three minutes earlier.
David Beckham's Inter Miami – led by former Manchester United team-mate and head coach Phil Neville – raced out to a 2-0 half-time lead via Brek Shea and Higuain before Cincinnati rallied with goals from Alvaro Barreal and Hagglund.
Former Argentina international Higuain, though, had the final say with his fourth goal of the season.
Elsewhere, New England Revolution topped defending champions Columbus Crew 1-0 and Orlando City beat DC United by the same scoreline.
Orlando have opened the season unbeaten in their first five games (W2 D3). The Lions have lost just three regular-season matches since the end of the MLS is Back Tournament, fewer than any other team that was in MLS both last season and this.
Inter required a 97th-minute equaliser from Christopher McVey to rescue a point, despite having led 3-2 entering the final 10 minutes thanks to a first-half Gonzalo Higuain hat-trick.
Brandon Vazquez scored twice to turn the game on its head, leaving Neville furious despite McVey's last-gasp intervention.
"We defended like little boys, we defended naively, we didn't compete, we lacked discipline and concentration," the former Manchester United and Everton defender said. "And that's unacceptable, unacceptable.
"Simple balls into the box we didn't deal with. Simple concentration bits we didn't deal with.
"We are in the stage of the season where concentration is the main thing, concentration will get you to win games of football, and it's not going to be easy; you've just got to defend and do the right things all the time, and defensively we were as poor as we have been all season."
Remarkably, it was not Saturday's first eight-goal draw, as Minnesota United and the Portland Timbers had earlier played out a thriller.
Sebastian Blanco got the scoring started in the first minute, but there was no late drama in this one, with all eight goals netted before the 70-minute mark.
This was the first time in MLS history two matches on the same day have seen both teams score at least four goals, but there was a chasm between the Philadelphia Union and the Houston Dynamo in Saturday's third high-scoring game.
The Union ran out 6-0 winners as Mikael Uhre continued his stunning run of form at Subaru Park, netting either side of half-time for his fifth and sixth goals in his past four home games.
Uhre had also scored twice in a 7-0 defeat of DC United earlier in July, making Philly the first team to win multiple games by a six-goal margin in a single MLS season.
Elsewhere, New York City FC lost ground on the Union in the East as they drew with CF Montreal, while Sebastian Druissi continued his MVP bid by inspiring Austin FC to a 2-0 win at Sporting Kansas City.
"He continues to demonstrate why he deserves that [award]," said Austin coach Josh Wolff.
Higuain opened the scoring in the 19th minute with an absolute rocket, firing his direct free kick to the goalkeeper-side of the wall and into the top corner.
While that gave Miami the momentum, it was ripped away 10 minutes later when Alejandro Pozuelo was shown a straight red card, putting the away side on the back foot the rest of the way.
Lewis Morgan's goal in the 43rd minute ensured the teams would head into the break all tied up, and Daniel Edelman made it 2-1 for the Red Bulls just eight minutes into the second half.
A second yellow card to Kyle Duncan turned it into a 10-on-10 match, but 19-year-old substitute Caden Clark was able to give New York some breathing room in the 74th minute, building an eight-point gap between his fourth-placed side and fifth-placed Orlando City in the East standings.
The Red Bulls are still 10 points adrift of the conference-leading Philadelphia Union, who enjoyed a 6-0 smashing of the Colorado Rapids in front of their home fans.
Daniel Gadzag netted a hat-trick, giving him 11 goals in his past nine games, and 16 for the season, which ties him for the second-most in the league.
The one-sided beatdown included a 26-to-five shot count, while Philadelphia also controlled 59 per cent of the possession.
The Houston Dynamo – the worst team in the Western Conference this season – nearly pulled off an upset away from home against third-placed Minnesota, but ultimately went down 2-1.
Houston opened the scoring in first-half stoppage time through Corey Baird, and they held their 1-0 lead until the final stages when an own goal from Fafa Picault tied things up in the 79th minute. Minnesota then stole all three points with Luis Amarilla's 84th-minute winner.
Cincinnati and the Columbus Crew are fighting it out for the fringe playoff sports in the Eastern Conference, and they could not be separated in their 2-2 draw.
Columbus – who only had 0.43 expected goals in the game, compared to 1.36 for Cincinnati – made it 1-1 in the 74th minute with Derick Etienne's leveller, but Cincinnati took the lead straight back three minutes later through Matt Miazga. Steven Moreira would salvage a point for the Crew with nearly the last touch of the game in the 96th minute.
An Italian one-two punch lifted Toronto to a 2-0 win over Charlotte, with Lorenzo Insigne and Federico Bernadeschi both striking in the second half.
Montreal received two early goals courtesy of Ismael Kone and Romell Quioto and were able to defend them for a 2-0 win against the Chicago Fire, while Sporting Kansas City edged fellow Western Conference cellar-dwellers the San Jose Earthquakes 1-0.
In the late window, FC Dallas and Real Salt Lake fought out a 1-1 draw, and Hany Mukhtar grabbed another two assists to help Nashville SC handle the Vancouver Whitecaps 3-0. Mukhtar now has 16 goals and 11 assists in 27 appearances.
City were in control throughout, creating 16 shots in the first half compared to just four for Miami, but they went into halftime tied at 0-0 after hitting the woodwork three times.
In one instance, a turnover from Miami goalkeeper Drake Callender handed City's Heber a golden opportunity to break the deadlock, but his chip was cleared off the line into the crossbar, with the rebound then being hacked off the post by a second defender.
City's dominance was rewarded in the second half, with Santiago Rodriguez brilliantly working his way into the Miami penalty box before dishing it off for Gabriel Pereira to finish in the 63rd minute, before Rodriguez also set up the second goal six minutes later with a clever backheel to Maximiliano Moralez.
Heber completed the rout in stoppage time to end the career of Miami's iconic striker Gonzalo Higuain, who was playing in his final season, with City now set to take on Montreal in the Eastern Conference semi-finals.
Later in the day, FC Dallas needed a penalty shoot-out to advance past Minnesota in the Western Conference.
Emanuel Reynoso's goal for Minnesota in the 53rd minute was canceled out by a 64th-minute strike from Facundo Quignon, and after 30 minutes of extra time, it all came down to penalties.
It was Minnesota's captain Wil Trapp who failed to come through with his side's second penalty, with his tame effort into the bottom-left corner being saved by Dallas' Maarten Paes, before Alan Velasco finished things in style with a cheeky panenka.
The former Argentina international, who won 75 caps for his country, was on the losing side as Miami were beaten 3-0 by reigning champions New York City FC.
Higuain had confirmed his plan to retire earlier this month and was in tears as he left the field, with a career that included spells with Real Madrid, Napoli and Juventus now at an end.
"I felt like what I had loved the most as a job had ended. It was half my life, my career, 17 and a half years," said Higuain, who previously spoke of plans to become a mental health coach, as he explained why he was moved to tears.
"Images from my entire career came to my mind – what I lived, what I worked, what I experienced – and I’m leaving very happy because I gave it all until today. That's the most important thing.
"The dream is over and another life begins."
A six-time domestic league champion – with three LaLiga crowns and three Serie A triumphs – the 34-year-old signed for the MLS club in September 2020.
He has left a lasting impression on the club and coach Phil Neville, having scored 29 goals in 67 MLS appearances.
"He's leaving in the way in which he should be leaving, with the goals he's scored, the happiness he's played with," said former Manchester United full-back Neville.
"The way he's embraced his team-mates and carried his team-mates is exactly what we expected. I think he can be massively proud.
"It's a massive adaptation period for any player to come to the MLS, particular when you've played in Europe, in the Champions League, to come here. I think it's a big learning curve if people come here and think it's going to be easy and it's not.
"I'm proud to have managed him. I think as a club we're proud to have had him. He leaves in a good moment, he helped us get to the Playoffs, and he can now enjoy his retirement. We wish him all the best, and he'll always be welcome."
Carlos Vela scored a double, with both goals coming from the penalty spot, as LAFC secured only their second victory from their past eight games.
LAFC have a 15-1-0 record when scoring first this season although Houston leveled the game in the 24th minute from Corey Baird's classy goal after Vela netted an eighth-minute spotkick.
Vela restored LAFC's advantage from the spot on half-time after Fabrice Picault's handball was spotted by the VAR, with Ryan Hollingshead lifting home a third in the 52nd minute.
LAFC remain top of the Western Conference, nine points ahead of second-placed Austin, with two more matchdays until the postseason begins.
Gonzalo Higuain scored a 94th-minute winner to boost Inter Miami's playoffs hopes with a 3-2 road win over DC United, who had Christian Benteke net his first goal for the club.
Higuain struck the winner in the fourth of eight stoppage-time minutes, with a first-time strike from Deandre Yedlin's low cross from the right.
Benteke had opened the scoring in the 22nd minute with a back-post left-foot volley, before Leonard Campana's double for Inter.
Taxiarchis Fountas equalised in the 57th minute before Higuain's late winner, which means Inter are seventh in the Eastern Conference, moving above Columbus Crew, who conceded again late in a 1-1 draw with Portland Timbers on Sunday.
The Crew were denied all three points with Santiago Moreno lashing home a 95th-minute equaliser for the Timbers, after Kevin Molino's first-half strike.