Krejci beat James Reimer with a shot from the faceoff circle after coming down the left wing.
The Leafs now face a potentially decisive Game 5 on Friday in Boston, where history and the Bruins are against them.
The Bruins are 15-2 when leading a best-of-seven series 3-1. And Toronto is 2-12-1 in its last 15 games in Boston.
Goalies Tuukka Rask and Reimer were both busy in an end-to-end overtime, with Toronto's Matt Frattin hitting Rask's goalpost some six minutes in.
Reimer's wife and mother were in the stands, often unable to watch for the tension.
Joffrey Lupul, Cody Franson and Clarke MacArthur scored for Toronto.
Patrice Bergeron added a single for Boston, with captain Zdeno Chara collecting four assists.
Krejci now has five goals and five assists in the series, combining with linemates Milan Lucic (0-7) and Nathan Horton (3-3) for eight goals and 15 assists.
The Leafs used their speed to great effect and led 2-0 after the first period, only to see the Bruins fight back to take a 3-2 lead in the second before Toronto stopped the slide with a late goal of its own.
Tied 3-3, the game hung in the balance to open the third. It was a crucial period with the Leafs either pulling even in the series or going down 3-1.
It was desperate high stakes hockey with players putting their body on the line. Toronto defenceman Mark Fraser, who does not wear a visor, took a Lucic shot to the face with 12 minutes remaining and headed to the dressing room, leaving a pool of blood on the ice.
The overtime was even more tense.
Inside the Air Canada Centre, the chant of "Go Leafs Go" started before the anthems. Outside, blue-and-white fans came out early to party in the adjacent Maple Leaf Square.
Once again, 2nd Lieutenant Scott Newlands and the 19,708 fans inside bellowed out the anthem to kick off the festivities.
Lupul gave them something to cheer about on the Leafs' first shot at 2:35. Lupul gave the puck to Phil Kessel who raced around the goal and then fed it back to Lupul, who had got enough separation from the Boston defencemen to slap the puck past Rask for his third of the playoffs.
Reimer had come up big seconds before, stopping Jaromir Jagr with a pad save and then handling the shot from the ensuing rebound.
Rask stoned Tyler Bozak after a Leaf player stepped into Krejci to separate the Bruin from the puck at the boards. Kessel them almost beat Rask, heading for the net and almost tucking it in off the goalie.
Krejci had a glorious chance to tie it up late in the period but rattled the puck off the post with the goal wide open.
Franson doubled the lead on Toronto's eighth shot of the period with a shot from the point that beat Rask, who had Chara in front of him, at 18:32.
Lucic was cut in the face by a shot from Chara as the period ended. He was hunched over as he skated off before a trainer gave him a towel to stem the flow of blood.
Reimer was busy in the first period, with Boston outshooting the Leafs 16-8. But Toronto outhit the Bruins 26-14 and seemed to have more spring in its step
There were ominous signs for Boston, which trailed after 20 minutes for the first time in the series. Their record being down after 20 minutes in the regular season was 2-7-3. Chara was on the ice for both goals in the period.
The Leafs, who had complained about how the faceoffs were officiated in Game 3, also had 14 faceoff wins to eight for Boston in the first period.
But the Bruins showed their character in the second period, pushing back on the power play just 32 seconds in with an opportunistic Bergeron beating Reimer on a rebound of a screened Chara shot from the point. It was Bergeron's first point of the series and first goal in 14 games.
Bruins defenceman Johnny Boychuk limped off the ice and then headed slowly to the dressing room soon after. He returned minutes later.
Chara began to assert himself, laying out Leafs and using his wingspan to defend the puck.
Krejci was credited with Boston's second goal after a goalmouth scramble at 12:59 that saw Mikhail Grabovski go flying. Chara had helped set the stage with a driving rush.
The Boston power play, which was 1-for-9 coming into the game, paid off again with Krejci one-timing a shot past Reimer at 16:39 after a glorious pass from Horton.
MacArthur, who replaced Ryan Hamilton in the lineup, tied it up 44 seconds later with a slapshot from the slot.
Boston finished the period killing off a five-on-three penalty advantage.
Toronto had to kill off a double minor as Nazem Kadri went off 58 seconds into the third period after cutting Chris Kelly with his stick. Rask stopped Lupul twice in succession as the Leafs hit back.
The Bruins began to assert their dominance in the faceoff circle as the game wore on.
Chara took a high-sticking penalty with 6:33 remaining but the Toronto power play, 0-for-4 on the night, was unable to take advantage.
Reimer and Kessel both got up slowly with a minute remaining after collisions at both ends of the rink during an end-to-end sequence.
NOTES — Jaromir Jagr picked up an assist, giving him sole possession of sixth place on the all-time playoff points list (191) ... The two teams combined for 245 hits in the first three games, with Toronto holding a 129-116 edge.Suggest a correction