It was the seventh win in their past eight games for the Oilers.
Oilers coach Craig MacTavish says they were lucky to get two points after allowing an early 3-0 lead slip away.
"That was a wild game," he said. "Kind of hard on the heart for this time of year. You take a 3-0 lead and you think maybe it is going to be an easy night for us.
"We have a young team and you got seduced into thinking it's going to be point night. Hopefully, we have learned a lesson here."
It was the fourth consecutive loss for the Blues, who have lost 10 of their past 11 games.
Blues coach Andy Murray admitted it was special to see Cogliano come through again, though it's not likely to be a favorite memory.
"Obviously we scouted the two previous wins and saw the Columbus one and saw the one in Chicago, and he was on the ice and put the puck on his stick with a few seconds left in the hockey game, so good for him, but I didn't really enjoy watching it," he said.
Edmonton got off to a quick start, scoring just under three minutes in on its first shot. Stortini hit the corner behind Blues goalie Manny Legace with a wrist shot.
The Oilers took a 3-0 lead, scoring on a pair of power-play goals. Gagner fed a pass back to Stoll at the point on a two-man advantage and he sent a shot into the back of the net.
Gagner was credited with Edmonton's second power-play goal as he attempted to feed the puck in front to Dustin Penner, only to see it go in off the skate of Blues defender Eric Brewer.
The Blues got a break late in the period to cut Edmonton's lead. Boyes' long dump-in shot took an odd bounce off the boards and came out to McDonald, who had an easy tap-in with Oilers goalie Mathieu Garon badly out of position.
St. Louis got back into the game just 40 seconds into the middle frame as Stempniak batted a pass from David Backes between Garon and the post to make it 3-2.
The Blues continued to pressure and tied the game just over 11 minutes into the second as Paul Kariya made a nice feed from behind the net, allowing Boyes to score his 37th of the season.
It was the fourth and final meeting between the two teams this season. Edmonton ended up winning the series 3-1.
Copyright by STATS LLC and The Associated Press
Arena: Rexall Place Location: Edmonton, Alberta
Referees: Michael McGeough, Justin St. Pierre Linesmen: Mike Cvik, Brad Lazarowich