BOSTON — Starlin Castro stepped in the batter’s box to lead off the second inning. He took a called strike, on a high fastball over the outside corner.

Next came a cut fastball, also up, and Castro swung and missed.

Then, finally, the change-up, dropping below knee level, as Castro flailed for strike three.

At times, David Price was the artist, delivering an assortment of fastballs, cutters and change-ups to either side of the plate, elevated or down low.

But Price left a couple of change-ups up for extra-base hits, and he also gave up a two-run homer on a low, inside fastball that actually looked like a nasty pitch.

After only 31/3 innings, David Price and the Red Sox were losing 5-2. He had already surrendered seven hits.

But isn’t Price supposed to be coming into form as the Red Sox push toward the postseason?

And here is where we insert the required reference to Price’s pricey contract of $217 million for seven years. The Red Sox did not pay for what Price was delivering on Saturday.

At least, not at first.

But now we know … the rest of the story.

Price had thrown 72 pitches after 31/3 innings. The bullpen was getting busy.

But Price steadied himself, retired eight of the next 10 batters – four by strikeout – and gave the Red Sox six innings, keeping them in the game.

“That was huge,” Red Sox Manager John Farrell said. “His pitch count was getting to the point to where his day was being over. He made big pitches when he needed to.

“Getting through six innings makes a world of difference when you’re going to the bullpen.”

It wasn’t vintage Price, but it was enough. With Price shutting the door, he helped Boston eventually come back for a 6-5 win.

“Once I gave up those runs, I knew if I could just hold it right there, our offense is going to strike at some point,” Price said. “That’s what we’ve done all year.”

Price had not been ace-like all year, leading to teeth-gnashing across New England. After his first seven starts, he had a 6.75 ERA. Since then, he’s had a 3.27 ERA.

Price’s six-inning effort Saturday included no walks and seven strikeouts. It was his first no-decision after winning his last seven starts.

“I had a lot of good things happen to me over my last seven starts,” Price said. “Today wasn’t (like that), but I still threw the ball well.”

Price has a point. He made pitches. In the third inning, Austin Romine singled by reaching out for a sinking change-up. Price did leave a change-up too much in the strike zone for Brett Gardner’s RBI triple.

But when Gary Sanchez came to the mound, Price was commanding his pitches.

He tried to get Sanchez to chase two outside change-ups, falling behind 2-0. It was 2-2 after two fastballs on the corners (outside and then high and inside). After Sanchez fouled off an outside change-up, Price came inside with a low, 95 mph fastball.

“It was a good pitch,” Price said.

But Sanchez is a hot hitter and turned on it, sending it over the monster for his 15th home run and a 3-0 lead.

“The only thing I would change about that is throwing a four-seam instead of a two-seam,” Price said. “But it was still in a good spot. He’s a good player. You tip your cap.”

New York got two more runs in the fourth inning. After giving up two singles, Price left a change-up over too much of the plate, for a two-run Romine double.

In the sixth, after yielding a leadoff single, Price was at 100 pitches. The bullpen had warm arms, but Farrell stayed in the dugout.

“Leaving me out there against guys who have had success against me, I definitely appreciated that,” Price said.

Price got Chase Headley to fly out and struck out both Romine and Rob Refsnyder, looking at backdoor cutters.

That ended his day, and allowed Boston room for a comeback.

Price’s numbers this year have some bright spots, including 217 strikeouts in 2112/3 innings, and 44 walks (none in his last 22 innings).

Price showed something beyond numbers Saturday. He got hit, and scored upon, but he did not break.

“I gave up five, but we found a way to win,” Price said.