Van Riemsdyk scored in the first period in helping the Leafs build a 3-1 lead, but the Senators fought back with third-period goals from Erik Condra and Erik Karlsson to knot it up.
After a scoreless overtime, the game went to a shootout.
Mason Raymond then won it with a try that also eluded Anderson, giving the Leafs their first road victory since October.
Phil Kessel and Jake Gardiner also scored and Reimer finished with 47 saves.
Clarke MacArthur scored and Anderson made 28 saves for the Senators, who dropped a fifth straight.
Pistorius testifies he didn't consciously pull trigger when he shot girlfriend
Charlize Theron not engaged to Sean Penn 'yet'