Carl Gunnarsson also scored for the Maple Leafs, who snapped a two-game losing streak.
Nathan Horton and Gregory Campbell had goals for the Bruins, which lost for the fourth time in 10 games.
Versteeg made it 2-2 with 42 seconds remaining with a power-play goal. A shot caromed off the end boards and bounced right to Versteeg, who shoveled the puck into the wide-open net.
Rookie Nazem Kadri, on his first career attempt, also scored in the shootout for Toronto.
Tyler Seguin scored Boston's shootout goal. Seguin was drafted second overall by Boston with a pick the Bruins acquired from the Maple Leafs in the deal that sent Kessel to Toronto in September 2009.
Kessel had just one assist in seven games against his former team before scoring the decisive shootout goal on Saturday.
Toronto started strong, skating hard and pressuring goalie Tim Thomas. But Tim Brent's giveaway in the Maple Leafs' zone led to Horton's ninth goal of the season at 4:48 of the first period. Horton snapped a shot high past goalie Jean-Sebastien Giguere.
After some uncharacteristic turnovers by the Bruins, the Leafs were rewarded with Gunnarsson's first goal of the season with 4:07 left in the first period.
Gunnarsson finished off a pretty pass through the crease from Tyler Bozak. Kadri got the second assist on the goal.
Kadri began the game centering the fourth line between tough guys Colton Orr and Jay Rosehill, who was called up from Toronto of the AHL on Friday.
Campbell beat Giguere from the high slot with a wrist shot through traffic at 6:08 of the third period to give Boston a 2-1 lead.
Giguere made 25 saves, playing well in his second game back from a groin injury.
Thomas made 38 stops, including a number of big saves in the waning minutes before Versteeg's tying goal.
Thomas also kept the Bruins in the game with a brilliant glove save on Francois Beauchemin in overtime.
Notes
Tomas Kaberle played his 844th game with the Maple Leafs, tying Darryl Sittler for eighth on the franchise list. … Brett Lebda and John Mitchell were healthy scratches for the Maple Leafs. Daniel Paille and Jordan Caron sat out for the Bruins.