On days where the Red Sox offense isn’t scoring runs in bunches, Wednesday offered a blueprint for how the club can win games anyway.

Timely home runs? Check. A dominant starting pitching performance? Check. Clean games by both the defense and bullpen? Check and check.

All of the ingredients were there for the Red Sox in Wednesday’s 3-1 win over the Phillies, which evened the series at one game apiece. Trevor Story and Ceddanne Rafaela each went deep, with Rafaela’s two-run pinch hit bomb in the sixth giving Boston the lead for good, and Sonny Gray delivered another strong outing in his second start back off the injured list.

“Tonight we get the long ball,” said Red Sox interim manager Chad Tracy. “It’s still three (runs), we want to get more obviously but two big swings in big spots and Rafaela obviously huge right there.”

The Red Sox struck first when Story hit a solo home run to the Green Monster seats with one out in the second inning. It was Story’s third home run of the season and his first since April 15, ending a streak of 21 games without a homer.

The lead proved short lived. Philadelphia tied the game in the top of the third on a solo shot by Justin Crawford, the son of former Red Sox outfielder Carl Crawford and a rookie appearing in just his 38th MLB game.

Crawford’s blast looked like a routine fly ball off the bat, but the ball was hit high enough to pick up the gusting winds and carried into the first row of the center field bleachers 403 feet from home plate.

Boston Red Sox center fielder Ceddanne Rafaela, right, celebrates his home run with Wilyer Abreu during the sixth inning at Fenway Park. (Photo By Matt Stone/Boston Herald)Boston Red Sox center fielder Ceddanne Rafaela, right, celebrates his home run with Wilyer Abreu during the sixth inning at Fenway Park. (Photo By Matt Stone/Boston Herald)

The starting pitchers took care of business from there.

Coming off a strong return from the IL in which he threw five scoreless innings last time out, Gray was excellent again on Wednesday. Gray threw six innings on 78 pitches, allowed one run with two hits and one walk, and most promisingly struck out a season-high six batters.

“He was awesome,” Tracy said. “Strikes, pounded the zone, looked a lot like the last one and got an inning further with only about eight or nine more pitches than last time, so he was really, really good.”

Gray recorded back-to-back 200-strikeout seasons the past two years with the St. Louis Cardinals, but entering Wednesday he had only tallied 15 strikeouts in 28 innings. His 12.6% strikeout rate was nearly half his career average and 14 points down from a year ago.

Gray said the strikeout issue has been vexing, but he was encouraged by Wednesday’s progress.

“I feel like I left three out there, but to have one an inning at least at the minimum feels more normal,” Gray said. “It’s something honestly I’ve been digging into a little bit because I strike people out, and I haven’t been, so I’ve been trying to find the why of that, and I think I’m getting closer to that.”

Phillies starter Andrew Painter, long regarded as one of MLB’s top prospects but who came into the night with a 6.89 ERA on the season, enjoyed his best outing of the season. He allowed one run over five innings with four hits, no walks, a hit batsman and four strikeouts.

The 23-year-old finished his outing by retiring the last seven batters he faced, including three straight strikeouts in the fifth to wrap up his night.

Boston Red Sox shortstop Trevor Story throws to first base in the third inning. (Photo By Matt Stone/Boston Herald)Boston Red Sox shortstop Trevor Story throws to first base in the third inning. (Photo By Matt Stone/Boston Herald)

Once Painter was out of the game, the Red Sox offense began waking up against Philadelphia’s bullpen.

Wilyer Abreu started things off in the sixth by recording his third single of the game — though not until after he swung through a pitch that wound up hitting him in the arm for a particularly painful strike. Two batters later Rafaela pinch hit for Masataka Yoshida to face Phillies righty Orion Kerkering, and Rafaela took him deep to the Monster for a go-ahead two-run homer.

“There’s a clutch gene in there with him,” Tracy said. “He tends to get big hits in big moments.”

“I really want to be in those situations,” Rafaela said. “Sometimes I don’t do the job, sometimes I do, like I had a chance yesterday but I didn’t do it, and I wanted to be in this situation today and it came true.”

That proved to be all the offense the Red Sox needed. Justin Slaten came on for Gray and tossed a scoreless seventh, Garrett Whitlock had a perfect eighth and Aroldis Chapman survived a stressful ninth for his ninth save of the season. Chapman allowed two walks and had runners reach second and third with two outs, but he struck out Alec Bohm to end the game.

The Red Sox defense also delivered its seventh straight game without an error, and Story and Willson Contreras in particular made several outstanding plays. The Phillies finished with three hits on the night, and other than Crawford’s homer the club didn’t have a runner advance past second until the bottom of the ninth.

“We’ve talked a lot about how good I feel we’ve been defensively,” Tracy said. “Trev with two plus plays going to his backhand side and Willson obviously, those are big outs in big spots.”

One scary moment did take place in the eighth when Connor Wong stepped on Edmundo Sosa’s foot and rolled his ankle on a pop-up behind the plate, causing the catcher to fall to the dirt in a heap. Whitlock was able to recover and make a sliding catch to end the inning, but Wong did not return and was subbed out for Carlos Narvaez to catch the ninth.

“They did some quick images, everything’s negative, he was able to kind of jump on it,” Tracy said. “Just felt a little discomfort pushing off of it and going into the last inning if we have to make a throw or something if he can’t do that let’s go ahead and make that move. So I think we’re going to be OK but we’ll know more tomorrow.”

“(I feel) good, it’s a little sore, I’ve done this one before much worse,” Wong said. “So everything we did seemed like it’s going to be fine so we’ll see how it is in the morning and go from there.”

Whitlock, who made a similar sliding catch on a pop-up in foul territory a few years ago, described the whole thing as playing out in slow motion.

“My mind was like ‘alright we got out of it,’ and then I was like ‘holy crap Connor’s in the dirt, I hope he’s OK,’ then it’s like ‘wait a minute the ball’s still in the air, I need to go,’ ” Whitlock said, adding that his teammates were joking that he could have made the catch standing up.

The Red Sox improved to 18-24 and have a chance to take two out of three from the Phillies on Thursday. Ranger Suarez (2-2, 2.77) will get the ball against his former team, while the Phillies will answer with Jesus Luzardo (3-3, 5.98).

First pitch is scheduled for 6:45 p.m., though with inclement weather in the forecast fans will want to keep an eye out for possible delays.