Kyle Gibson won his 11th game of the season on Sunday and has a chance to match his career high of 13 wins, set in 2014.

But he was close to ruining it all because of two terrible innings against the Toronto Blue Jays.

How close?

“Transparently speaking, it was very close,” Twins manager Paul Molitor said. “It was one pitch away a couple of times.”

Remarkably, Gibson (11-10) found his command, stopped throwing gopher balls and, once again, benefited from a robust offense to pitch six innings and help the Twins recover for a 13-7 victory.

But it was ugly early. Gibson left a 1-0 pitch over the middle of the plate to the second batter of the game, Josh Donaldson. And the man nicknamed Bringer of Rain jacked it into the third deck at Target Field. The eight Twins in the field turned into statues as the ball took off. For they all knew it was gone.

The first person to move was Eddie Rosario, who bent over to tie a shoelace — before the ball even landed. The estimated distance was 476 feet, the third-longest home run in Target Field history.

“If you are going to give them up, I guess you are going to give them up,” Gibson said.

Before the inning was over, Gibson walked four batters, forcing in a run, then gave up a two-run single to Raffy Lopez as Toronto took a 4-0 lead. Nik Turley began to warm up, but Gibson got out of the inning.

Donaldson returned in the second with another home run, his fifth of the series, to make it 5-0. Turley began warming up again, but Gibson got out of the inning. But he solved his mechanical issues right as the Twins offense took off.

The Twins sent 12 men to the plate in the second as they scored seven runs, including back-to-back home runs by Rosario and Byron Buxton. The Twins scored six more in the fifth, the big blows being Joe Mauer’s grand slam and a second homer by Rosario.

With Robbie Grossman on first and Jason Castro on second, Dozier noticed Donaldson playing back at third and bunted for a hit, loading the bases for Mauer.

Toronto’s Chris Rowley got ahead of Mauer 0-2 and threw a fastball that was inside and off the plate. But Mauer opened up and hammered it over the seats in right for the fourth grand slam of his career, and first at home.

Rosario added a solo homer, his second of the game, making it 13-5.

“I don’t like to sit on anything 0-2,” said Mauer, who admitted he had an inkling that Rowley was coming inside. “I just tried to stay short and put a good swing on it.”

Castro plays

Castro has had a rough run. He was placed on the concussion DL on Aug. 24 after taking a foul ball off his facemask and missed 10 games. On Wednesday, San Diego’s Austin Hedges struck out swinging, his bat plunking Castro on top of the head during his follow-through.

On Saturday Castro took foul balls off his right collarbone and shoulder while working behind the plate. He was sore on Sunday but remained in the starting lineup.

“He’s a little sore, but he’s good,” Molitor said. “It’s that time of year where, unless it’s something major, you are going to give it a shot.”

Etc.

• Miguel Sano spent the day having treatment on his left shin and did not do any baseball-related activities. The plan is for him to fly to New York with the team to take care of a personal issue, then return to the Twin Cities to continue his recovery from a stress reaction in the shin.

• The Yankees have rearranged their rotation; righthander Luis Severino is in line to pitch the wild-card game on Oct. 3. Molitor already has tabbed Ervin Santana to start that game.