Sporting KC led through a Khiry Shelton goal near the end of the first half, but Melia's sending off was followed by Shelton turning the ball into his own net in the 92nd minute before Kevin Molino struck in the last of the seven added minutes.
Minnesota United were almost anonymous for much of the game but now take an unlikely three points into their second match of the MLS is Back Tournament against Real Salt Lake on Friday.
The Loons' Tyler Miller may have harmed his international prospects in the conceding of the first goal. With United States men's national team head coach Gregg Berhalter standing behind his mesh, the uncapped shot-stopper peculiarly vacated his near post while Shelton was bearing down on his goal. Shelton gratefully accepted the invitation to score.
The accommodating goalkeeping from Miller detracted attention from Alan Pulido's stunning turn and quick through-ball to tee up Shelton, and the goalscorer's run that preceded his strike.
Despite being second best throughout the tie, Minnesota were given a faint hope of victory when Melia hauled down Aaron Schoenfeld outside his area.
Minnesota United subsequently dominated against their depleted opponents but seemed to ruin their chance to level in the 90th minute when Hassani Dotson somehow flicked a header over the bar from 3 yards.
But there was still time for plenty of drama. Shelton chested the ball past substitute 'keeper Richard Sanchez following a lofted free-kick into Sporting KC's area. The players in dark blue were visibly shell-shocked by the surprise equalizer.
Sporting KC were perhaps still rocked when Raheem Edwards, who was called off the bench by Adrian Heath 20 minutes earlier, squared for Molino to score the winning goal deep into injury time.