When will Sonny Gray give the Yankees the innings they expect?

NEW YORK -- The stars had aligned perfectly for Sonny Gray.

After going nearly three weeks without recording a win, the struggling New York Yankees starter had a legitimate chance to finally get one. Or so it seemed.

Gray entered his start Wednesday night facing the reeling Minnesota Twins, a team he has owned in recent seasons and one that was in the middle of a five-game losing streak. Gray also came into the outing behind a Yankees offense that has been on a prolific scoring tear.

Then there was the issue of catchers. Gray’s numbers have been notably better with backup Austin Romine behind the plate instead of starter Gary Sanchez. With the short turnaround of a day game looming Thursday, manager Aaron Boone made a key switch, giving Gray the catcher with whom he has had the most success.

Check, check and check. All signs favored a “W” being placed next to Gray’s name by the end of the night.

That didn’t happen, though, and he knows he’s the main reason for that.

“I don’t think it’s any secret that I’m struggling right now. I don’t think that’s something that’s trying to be hidden or anything,” Gray said. “But at the end of the day, I felt like I had the right mentality, I had the right mindset. It’s just sometimes hard to get things going.”

Although the numbers might paint a different picture, Gray and Boone came out of this start somewhat pleased with what the right-hander gave. He didn’t see the personal result he wanted, but he got closer to notching a win than he has in some time.

“Not a perfect outing by any means,” Boone said, “but I think a positive step forward for him.”

The Twins did their job, once again scoring fewer runs than the Yankees. New York’s offense did its job, too, hanging a four-spot on Minnesota in the fourth inning en route to a 7-4 win. Buoyed by Didi Gregorius' fourth straight game with a home run, the Yankees as a team rolled to a fifth consecutive win. They have taken nine of their past 12 games.

Although Gray pitched just well enough to get the victory, he didn’t last long enough to factor into the decision. Removed with two outs in the fifth, he gave way to reliever Chad Green, who instead earned his second win of the year.

“I really do view it as a step forward,” Boone said. “Because the stuff is there. And therefore, it’s about him gaining some momentum and confidence, and the results will start to follow.”

The Yankees have to hope those tangible results start showing up in Gray's next outing. Because this is the issue: Try as he might to fix the problems that have plagued him of late -- be they mechanical or matters of overthinking -- he hasn’t been able to stay in games long enough to give himself a chance.

More importantly, on the heels of four consecutive dominant outings from other Yankees starters this week, Gray turned in a five-walk performance that made it difficult for him to last very long. This was his second straight start with four or more walks in less than five innings of work.

“[Walks are] what kept it from being a giant step forward,” Boone said, adding that he was impressed with how Gray pitched to Twins hitters, crediting them for having good at-bats against him.

In Gray’s five starts this season, he has made it out of the fifth inning just once. When he lasted six against Baltimore on April 7, he earned his only win of the season. It was a four-hit outing in which he threw 86 pitches and allowed three runs to score.

Gray allowed three more Wednesday, but the high pitch count (104) and a nine-pitch, two-out walk to Eduardo Escobar to load the bases in the fifth signaled another early exit.

Before leaving, Gray said Romine’s presence helped calm him when things got rocky.

“He can really help you stay in it,” Gray said. “I mean, when things started going a little wayward there at certain times, that’s a really positive, and a strength of Romine is he can help you stay in it and maneuver around some certain situations and do whatever it takes.”

With Romine behind the plate, Gray’s numbers in parts of the past two seasons have been better. Ahead of Wednesday’s game, Gray was 3-1 with a 2.20 ERA in games when Romine was behind the plate. He had allowed just one homer (though Miguel Sano hit another off him Wednesday).

In games when Sanchez caught Gray, the pitcher has a 2-7 record with a 5.94 ERA, and he has allowed 11 home runs.

Before the game, Boone was asked if he thought Gray liked pitching to Romine because he seemed better at catching some of his breaking pitches in the dirt. The last time Gray and Sanchez were paired, Gray was credited with a pair of wild pitches.

“No, I don’t think it’s that,” Boone said. “When he came over here [in a trade from Oakland], they kind of connected and got on the same page.”

The biggest positive of Gray’s “step forward” outing, he said, was the fact that his club still walked away victorious.

“When you start a winner, you can go to sleep, and you can walk away from it,” Gray said.

Maybe next time out, he’ll last long enough to be recorded as a winner, too.