Mika Zibanejad scored in regulation for the Senators, and Anderson made 30 saves.
Jeff Skinner scored his 30th goal of the season for Carolina, which got 28 saves from Ward before the shootout.
Coincidental minor penalties in overtime had the teams playing 3-on-3 hockey for two minutes. Kyle Turris had the best opportunity for the Senators but his shot went over the net.
Carolina's Alexander Semin had Anderson beaten on a 2-on-1 but his backhander went wide.
"Structure-wise we weren't really sure what to do, but you need guys that are creative and are able to beat guys one-on-one because that's what it comes down to," Senators defenseman Marc Methot said of the 3-on-3. "The guys handled it well."
There were few scoring opportunities through most of the third period, but that changed in the final few minutes when both teams applied pressure in an attempt to keep the other team from earning points in the postseason race.
"There were definitely opportunities and a little spark at the end," Hurricanes forward Jordan Staal said. "The fans started getting into it, knowing the pressure of the last five minutes and that any mistake could be in the back of the net.
"It raised the intensity of the game for sure."
All the offense was produced in the first period as the game was tied 1-1 before five minutes elapsed.
Zibanejad opened the scoring at 1:41 when he deflected Patrick Wiercioch's point shot past Ward. The play was reviewed, but the goal was quickly confirmed.
"You've got to look at it as a lucky break on their side, and just get ready for the next shot," Ward said. "The puck was bouncing a little more than I would have liked, but other than that we gave our team a chance to win.
"Unfortunately, it doesn't feel good to lose in a shootout."
Zibanejad improved his career-best numbers to 14 goals and 29 points in 64 games.
"Lately we've been taking it one game at a time. It's cliche but we are," Zibanejad said. "We're doing whatever we can to make sure we get the points.
"The pressure is not on us, the pressure is on the teams above us, and by winning we're putting more pressure on them."
Carolina tied it after Erik Karlsson gave away the puck behind his net, and later was the last player to touch it before it went into the net behind Anderson.
Karlsson tried to sweep the puck around the boards behind the net but fanned on his attempt, giving Skinner possession of the puck behind the goal.
He moved from side to side before banking the puck in off Karlsson to tie it at 4:03.