The Montreal Canadiens are getting hot at the right time.
Jaroslav Halak, who stopped 21 shots in regulation and overtime, and Edmonton's Devan Dubnyk each turned aside the first four shooters they faced before Kostitsyn deked and shot past Dubnyk on the Canadiens' fifth attempt. Sam Gagner, who had a power-play goal during regulation, then lost control of the puck on the Oilers' final attempt.
"I was pretty confident going into the shootout, but it's all about luck, I think, in the shootout," Halak said. "It's 50-50 percent to the guy scoring or me stopping the puck. Lucky for us we scored the goal and he mishandled the last one."
"We have the two points so we're happy but we have to play better," defenseman Andrei Markov said. "It's not easy against these teams because they have nothing to lose."
Montreal moved into a tie with Philadelphia for sixth place in the Eastern Conference with 74 points. The Flyers lost 5-1 to Boston, which is eighth in the East with 72 points. Both Philadelphia and the Bruins have played three fewer games than the Canadiens, who have won five of six since the Olympic break.
"We'll be happy if we make the playoffs," Markov said. "That's our goal. That's why we have to play hard every game."
Robert Nilsson, Gagner Andrew Cogliano and Shawn Horcoff also scored for Edmonton, which lost its second in a row. Dubnyk made 22 saves. The 23-year-old rookie has yet to win in 11 NHL games, falling to 0-7-2.
"I thought our defense really worked hard tonight and they played a solid game, and Dubnyk did a good job," Oilers coach Pat Quinn said. "We're still having some problems with our down-low coverage but we fought back all night. I certainly would have liked a better result but it seems like we haven't got that as often as we'd like."
Edmonton is last overall in the NHL with a 21-39-6 record and 49 points.
Horcoff, who tied it at 4-4 with his 11th goal midway through the third, had a shorthanded breakaway late in overtime but was stopped by Halak after Cogliano was called for holding 3:28 into overtime.
"I told myself, 'I've got to stop it,"' Halak said. "That was the only way because otherwise I would be really disappointed with the game but right now we've got the two points. It wasn't my best game but the guys were there for me."
The final 45.6 seconds were played 3-on-3 when Plekanec was sent off for slashing Horcoff on the breakaway.
Horcoff drove a slap shot past Halak from just inside the blue line 9:19 into the third as Edmonton drew even for the second time in the period and third time in the game.
"I touched it a little bit but it happens," Halak said. "Everybody has these types of nights."
Sergei Kostitsyn had given Montreal its third lead 1:14 earlier when he came out of the right corner to beat Dubnyk for an unassisted goal to make it 4-3. He also assisted on Moen's goal 15:25 into the second that put the Canadiens up 3-2.
Plekanec gave Montreal an early 1-0 lead with his 20th goal 80 seconds into the game. But Nilson and Gagner scored 1:21 apart to give the Oilers their only lead. Gionta scored his 21st of the season to tie the game at 2 at 9:45 of the first as the two teams combined to score four goals before the midpoint of the opening period.
After Moen put the Canadiens ahead, the Oilers tied it at 3-3 when Cogliano scored 32 seconds into the third.
"We knew before the game that they had nothing to lose, and they wound up strong against us," Halak said. "It was crazy goals against us, but that happens. What counts is that we won the game."
Material from wire services and team media was used in this report