Ladislav Smid pulled Edmonton even at 2 with 3:47 left in regulation with his first goal in 38 games, coming from the low left circle off a nice pass by Ryan Nugent-Hopkins.
"Obviously, you don't want to give up that goal late," Stamkos said. "When someone works as hard as he (Roloson) does in practice, it was nice to get the win for him."
Pyatt scored twice for Tampa Bay, which won for the second time in eight games.
Linus Omark also scored for the Oilers. It was the first time that Khabibulin, who stopped 19 shots, played in Tampa since Game 7 of the 2004 Stanley Cup finals, when he helped the Lightning beat Calgary 2-1 to win the team's only NHL championship.
"We wanted to get this one for him," Edmonton coach Tom Renney said. "The guys talked about that, and certainly he wanted it."
Pyatt opened the scoring from just outside the crease during a power play at 3:24 of the second. After Omark tied with an in-close re-direction 9:57 into the second, Pyatt made it 2-1 on a rebound goal with 1:42 left in the period.
Roloson made an early first-period save on Ales Hemsky, who had his first career hat trick in Edmonton's 6-3 win over Nashville on Tuesday night, during a breakaway. The Oilers outshot Tampa Bay 15-7 in the first.
"I thought we worked hard and gave everything we could to claw our way back to get a point," Renney said.
Khabibulin stopped NHL goals leader Stamkos' breakaway backhander just over a minute into the second. Stamkos has not scored in four games since getting his 50th of the season against Boston on March 13.
"It's just not going in, that's all," Boucher said. "He's getting tons of chances."
Stamkos finished with six shots on goal.
Edmonton LW Taylor Hall sat out his third consecutive game because of a concussion. ... Tampa Bay RW Ryan Shannon will miss the rest of the season after having shoulder surgery. ... Oilers C Lennart Petrell, who left Tuesday's game because of a groin injury, did not play. ... This was just the third time since 2003 that Edmonton has played at Tampa Bay.
Copyright by STATS LLC and The Associated Press
TAMPA, FL - MARCH 22: Goaltenders Dwayne Roloson #30 and Sebastien Caron #35 of the Tampa Bay Lightning stretch...