The Yankees were aided immensely by a fortuitous bounce in the top of the 10th inning after Aroldis Chapman walked Tony Kemp with two out and sent him to second with a wild pitch. Chapman then uncorked a 100-mile-per-hour fastball that sailed over catcher Gary Sanchez, hit the padding behind home plate and bounced right back to Sanchez, who whirled and easily threw out Kemp as he tried to advance to third.

Then the youngsters struck — Andujar, the 23-year-old third baseman, and Torres, the 21-year-old second baseman.

With a total of only 76 major-league games between them, Torres and Andujar are prone to mistakes. They accounted for three of the Yankees’ five errors on Tuesday.

But they are also almost preternaturally calm in pressure-filled situations, as evidenced by the 10th, when Andujar stayed on an 0-2 slider from Peacock and lined it into the left-field corner for a double. Then Torres, who a couple of pitches earlier had seemed rattled by a strike call from umpire Tripp Gibson, laced a fastball the other way, into right field for the game-winning single.

“It’s amazing what these young kids can do these days at 21, 22 years old,” Gardner said.

After allowing Gardner’s first home run and Torres’s second-inning R.B.I. single, Morton settled down, striking out 10 in six innings and leaving with a 5-3 lead after surrendering a solo home run to Aaron Judge in the fifth.

Two of Houston’s runs were the result of a pair of errors, the first on a throw by Andujar that pulled Greg Bird off the bag at first, the second by starter C.C. Sabathia, who, after being hit in the glove by a Jose Altuve line drive, unwisely chose to throw the ball to first — and fired it into right field instead.