The Bruins seemed on their way to a victory with a 3-2 lead late in regulation but Sidney Crosby forced extra time when he scored with just 0.2 seconds remaining.
Shortly into overtime, Krug fired a shot from the left circle over Fleury's shoulder, giving Atlantic Division-leading Boston its eighth win in 10 games.
James Neal netted a pair of goals for the Metropolitan Division-leading Penguins, who dropped a second straight.
Fleury finished with 20 saves.
Celebrity Families of 2014 [PHOTOS]