Karlsson one-timed a pass from Matt Duchene on a power play, beating Ryan Miller with a shot inside the near post.
Each team already had a player in the penalty box when Anaheim's Jakob Silfverberg took a tripping penalty early in the third period. Ottawa scored on the 4-on-3 when Ryan tipped Mike Hoffman's shot.