United, the first-place team in the Eastern Conference, improved to 9-4-3 while the Union fell to 2-8-2.
Until United's goal in the 78th minute, the Union were having their way.
But then Chris Pontius tapped in a long free kick from Branko Boskovic to break the scoreless tie.
There was a lot of contact in the box, and Pontius found himself free on the far post, tapping it in on the run. United received the free kick on a foul by Carlos Valdes.
"He [Valdes] got a lot of the ball and that is a referee's decision and he made the call and we have to respect it and have to do a better job matching up on the free kick, especially late in the game," said Sheanon Williams, who returned to playing outside back after recently playing in the middle.
The Union almost tied it on Valdes' header off a Michael Farfan corner that was saved by United keeper Bill Hamid in the 85th minute.
Forward Jack McInerney, who had appeared in only 93 total minutes of MLS action this season, got the start and justified the move, creating several dangerous runs.
The first half was scoreless, but United had to feel fortunate after being thoroughly outplayed by the Union. In the 12th minute, McInerney fed Freddy Adu, whose blast from just inside the box was tipped over the crossbar by Hamid.
The Union kept mounting pressure. In the 16th minute, Michael Farfan sent a free kick to the far post, finding McInerney, who was wide open but couldn't quite control the ball.
In the 22d minute Adu sent Josue Martinez on goal. Hamid came off his line quickly to make a sliding save.
United had a chance in the 35th minute, but the always dangerous Dwayne De Rosario headed an Andy Najar corner kick wide.
The Union played without forward Lionard Pajoy, who was suspended one game and fined for a reckless challenge in the team's last MLS game, at Toronto.
Tempers almost flared in the 58th minute after United's Dejan Jakovic slid with both feet, upending McInerney and drawing a yellow card. Order was quickly restored.
In the 65th minute, Antoine Hoppenot hit the post on a shot from the left side of the 6-yard line after taking a pass from Adu.
"I got the ball, Jack Mac was in the middle, and he wanted a pass," Hoppenot said. "I saw [Hamid] leaning toward pass and left the front post open and I tried to curl it in and it hit the post."
That was symbolic of the Union's night, leaving the team frustrated by another game of missed opportunities.
Contact Marc Narducci at 856-779-3225, firstname.lastname@example.org, or on Twitter @sjnard.