Baltimore scored two runs in the 10th and Johnson atoned for his first blown save of the season by putting Boston down in order to end a wild 8-6 win for the Orioles.
"I try not to get too high and too low, but that's one of our better wins of the year. That was a real test for us a little bit," manager Buck Showalter said. "J.J.'s picked us up so many times this year and for the guys to come in and pick him up, that was nice."
The Orioles rattled off 15 hits, 13 of which were singles, against the Red Sox while improving to 4-0 at Fenway Park this season. Endy Chavez led Baltimore with three hits, including a single that drove in the second run of the 10th and gave Johnson a two-run cushion once again.
Johnson was one strike away from his 18th save of the season before Boston's Jarrod Saltalamacchia hit a two-run homer to tie it in the bottom of the ninth.
"It was my fault, so I wanted to get back out there," Johnson said. "They knew I was a little hot, so they kind of stayed away. We started putting some guys in position and we started getting some hits and I knew I was going back out. It just worked out."
Johnson (1-0) had a string of converting 25 straight save opportunities dating to last season. He had to settle for a win instead, something that has been rare lately for the Orioles.
Baltimore had lost seven of eight entering the game.
"We've had a lot of good ones, in this environment and a chance to roll over a couple of times," Showalter said. "It doesn't surprise me at all, but it's good to see."
Alfredo Aceves (0-3) walked Mark Reynolds to lead off the 10th and he advanced to second on a bunt by Steve Pearce, who converted his second sacrifice of the game and put the go-ahead run in scoring position.
Ronny Paulino had been 0 for 4 before delivering a single to center to put the Orioles up 7-6. Pinch-hitter Ryan Flaherty and Chavez followed with back-to-back singles to right, the second scoring Paulino and giving Baltimore an 8-6 lead entering the bottom of the 10th.
"The last inning, some balls just fell through," Saltalamacchia said. "That's the way the game goes."
The Red Sox couldn't strike twice against Johnson.
The Orioles got five hits in the seventh -- all singles -- and scored three to go up 6-4.
Boston starter Jon Lester was pulled for Scott Atchison after Chavez led off the seventh with a single to left. Robert Andino singled right away off Atchison and J.J. Hardy followed with a single that scored Chavez and tied the game at 4-all. The Orioles still had runners at first and second with nobody out when Adam Jones grounded hard right to Atchison for a potential double play, but Jones was able to outrun the throw.
Boston intentionally walked Matt Wieters to load the bases with one out, then Reynolds blooped a single to right to score Andino and reload the bases for Pearce, who drove in his second run with a single to right to make it 6-4. Matt Albers got out of the jam with no further damage when Paulino grounded into a double play.
Two of Baltimore's three runs were charged to Atchison, who had not allowed a run in a career-high 19 2/3 innings.
"We all threw well. It just wasn't our night from that end of it," Atchison said. "It seemed like when a runner got in scoring position, they found a hole. They hit a ball in the right spot. Those things are going to happen."
Baltimore starter Jason Hammel was pulled after throwing 106 pitches in five innings. He threw 31 in the fifth alone as Boston took advantage of an error and scored twice to tie the game at 2-2.
Reynolds couldn't field Daniel Nava's grounder when it took a tough hop and was called for an error, which was overturned later in the game. Mike Aviles followed with a single, then Scott Podsednik laid down a sacrifice bunt down the first-base line. Reynolds was charging and fielded it quickly, but his throw to try to get Nava at third got past Steve Tolleson and the ball rolled into the photographers' area out of play.
Aviles scored on Dustin Pedroia's shallow fly to center to tie it at 2-all.
Pedroia returned after missing six games with a thumb injury ... The Orioles swept the Red Sox 3-0 last month in a series at Boston. ... There was a moment of silence before the game in honor of Springfield Police Officer Kevin Ambrose, who was fatally shot Monday while responding to a domestic call for help. ... The Red Sox optioned RHP Daniel Bard (5-6) to Triple-A Pawtucket earlier Tuesday. Manager Bobby Valentine said that the club felt Bard needs to work on his mechanics in the minors before he gets another shot at making the rotation. ... Boston activated outfielder Darnell McDonald from the 15-day disabled list.