"Going into overtime, we knew we just had to build off the momentum and keep the pressure on."
Anderson made 49 saves, including 18 after regulation. Tomas Vokoun stopped 46 shots for Pittsburgh and took his first loss (4-1) since taking over for No. 1 Penguins goalie Marc-Andre Fleury.
Game 4 of the Eastern Conference semifinal series will be in Ottawa on Wednesday.
Tyler Kennedy scored with just over a minute to play in the second period to give the Penguins a 1-0 lead. That stood up until Alfredsson tied it in the closing seconds of the third.
"Just praying that we get something to the net," Anderson said of the tying goal. "We practice that drill all the time in practice. Guy drops it off and goes to the net.
"It was just the way we practiced. Alfie is one of the best guys in the game. We want the puck on his stick at all times."
Ottawa forward Jason Spezza, who hadn't played since Jan. 27 after undergoing back surgery to repair a herniated disc lined up alongside Milan Michalek and Cory Conacher.
The sellout crowd chanted the 29-year-old Spezza's name during his first shift.
Spezza faced a familiar opponent. His last game before surgery was at home against the Penguins, when he earned one assist and logged 21 minutes of ice time.
Bruins 5, Rangers 2 • In Boston, Johnny Boychuk broke a tie midway through the second period, and the Bruins scored two goals in the third to beat New York Rangers and take a 2-0 lead in the Eastern Conference semifinal series.
Boychuk put a 40-foot shot from the right inside the near post for his third playoff goal to make it 3-2 at 12:08. Brad Marchand, whose overtime goal won the opener, and Milan Lucic stretched the Bruins' lead in the final period.
Boston never trailed as rookie Torey Krug scored the first goal before Ryan Callahan tied it.
Gregory Campbell made it 2-1, and New York pulled even again on Rick Nash's goal.
• Boston 5,N.Y. Rangers 2
Bruins lead series 2-0
• Ottawa 2,Pittsburgh 1 (2OT)
Penguins lead series 2-1
• Chicago at Detroit,5:30 p.m., NBCSN
Series tied 1-1
• Boston at N.Y. Rangers, 5:30 p.m., NBCSN
• Los Angeles at San Jose, 8 p.m., NBCSN
Kings lead series 2-1
• Pittsburgh at Ottawa. 5:30 p.m., NBCSN