Anthony Fontana came off the bench to score two goals late in the second half, capped off by a 95th-minute winner that gave the Union a 2-1 victory over the New England Revolution that was more dramatic than it needed to be.

The first half was largely forgettable, save for José Andrés Martínez earning a booking in the 20th minute for a shove. He’ll miss the Union’s next game due to yellow card accumulation, and the Union (6-2-3, 21 points) will miss arguably their most influential player this year.

Martínez’s night grew worse in the 40th, when he took a shot to the groin and took awhile to get up from it. Fortunately, he was able to shake off the pain and the indignity.

Jim Curtin’s options for livening things up were limited. Ilsinho and Sergio Santos were unavailable because of injuries, two of five Union players who came into the day questionable and ended up unable to go. The others were defenders Jack Elliott and Kai Wagner and midfielder Warren Creavalle.

In fact, the injured list was so long that the Union played with a shorter-than-standard bench: six players instead of the nine allowed by current FIFA rules. (The limit is seven, but it’s been raised to help get through pandemic-shortened seasons.)

So the choices were midfielder Fontana, rookie forward/midfielder Jack de Vries, and reserve forward Michee Ngalina — with just one MLS appearance to his name in two years in the league.

Fortunately, New England (3-3-5, 14 points) midfielder Matt Polster gave the Union a gift with a 56th-minute tackle on Martínez that drew Polster’s second yellow of the night. Revolution manager Bruce Arena responded by fortifying his defense, taking off top forward Adam Buksa for midfielder Scott Caldwell.

Curtin made his first subs of the night in the 65th minute. Matt Real replaced Olivier Mbaizo at left back to bring a spark to that side of the field, and Fontana replaced Andrew Wooten. Arena then sent in Diego Fagundez and Tajon Buchanan for Cristian Penilla and Tommy McNamara.

Fontana finally broke the deadlock in the 73rd, cleaning up a loose ball 8 yards out after Kacper Przybylko got forced off it. The finish was a deft little chip, and just Fontana’s third ever in MLS.

Arena made his last substitutions three minutes later, finally bringing in big-gun forward Gustavo Bou and recently reacquired midfield playmaker Lee Nguyen.

That proved enough firepower to produce an equalizer in the 81st, when the Union’s back line uncharacteristically fell asleep and Buchanan walked through it on a give-and-go with Bou for his first career MLS goal.

Curtin called it “a silly goal against the run of play,” and he was right.

De Vries finally went in as stoppage time started, and with five minutes on the board there was plenty of time to find a winning goal. It came from Fontana with just seconds to go, a blast from 20 yards off after a corner kick clearance. It left New England goalkeeper Matt Turner helpless — and saved the Union from what would have been a poor result.

“Honestly, I just set it up as fast as I could and hit it as fast as I could,” Fontana said, noting that he’s been working on his long-range shooting in practice. “There was just that clear pathway, and luckily it found the back of the net. I couldn’t be happier.”

Curtin seemed as relieved as he was happy.

“We all would have a sickness in our stomach if we didn’t get the three points tonight,” Curtin said. “We made some mistakes on the goal, we got punished. How do we react, though? We raised our level … and eventually, in the last seconds, we were able to break through.”