Even in a streak of giddy good fortune, the Baltimore Orioles had no right to expect all the bounteous blessings that fell into their hands today in Yankee Stadium as they routed New York, 8-2, for their ninth straight victory and 16th in 17 games.

Above all, this was the day that Scott McGregor, who looked as if he might be a washout for the rest of '82 because of tendinitis, pitched 5 2/3 innings of two-hit, shutout baseball for his first victory since July. McGregor (13-12) not only pitched without pain in his shoulder, but rediscovered his best pitch, the change-up, which he has misplaced all season.

Of 21 batters against the left-hander, only one managed to get the ball out of the infield on the fly. Thanks to 31 change-ups, New York barely bruised the ball at all before McGregor, tiring because of his recent inactivity, took an early shower.

"Vintage Scotty," pronounced catcher Rick Dempsey after the Orioles had extended their longest winning streak of the season.

"Looked great," decreed Manager Earl Weaver.

"Big day," said McGregor, beaming. "If something hadn't gone right with it (the shoulder) pretty soon, we might have had to forget the rest of this season."

By winning, the Orioles, who were 7 1/2 games out of first place when this streak began, moved within three games of first-place Milwaukee in the American League East -- and just two in the loss column. They also have the second-best record in the major leagues. In the remaining games here, the Orioles' hot pitchers, Mike Flanagan and Jim Palmer, face rookies Mike Morgan and Jay Howell.

On this day of Oriole glee, Sammy Stewart pitched 3 1/3 innings of powerful, show-closing relief. After being in Weaver's doghouse for popping off last week, Stewart has pitched his way back into good standing.

Looking at a pitching staff that is suddenly so deep that it has Stewart, Storm Davis and Mike Boddicker consigned to long relief, Weaver crowed, "In spring training, I thought we had the best -- and deepest -- pitching in baseball. And now it's coming along."

Benny Ayala hit a two-run homer off Dave LaRoche in the eighth that allowed the Orioles to break the AL record for pinch-hit homers in a season (11). The major league record of 12 was set in 1957 by the Cincinnati Reds.

Ayala's drive, however, couldn't match Cal Ripken Jr.'s 415-foot, line-drive homer into the left field bleachers. It came off starter and loser Dave Righetti (8-8), who was wild (seven walks) and, despite a great fast ball, not particularly impressive.

Even the little stuff went the Orioles' way this pleasant afternoon: Gary Roenicke (one for 20 before the game) reached base four times and scored three times; Dan Ford had two hits and a walk ("it's a start"), and Lenn Sakata had three RBI with two singles, a walk and a sacrifice fly.

So impressive were the visitors, building an 8-0 lead before Oscar Gamble's double and Roy Smalley's homer with two out in the ninth, that the irritable crowd of 32,537 showered the outfield with the Yankee team pictures given away on "Poster Day."

"They were making those posters into paper airplanes that looked as big as the Concorde," said Flanagan.

For the Orioles, only one matter from this day had lasting weight: McGregor's return. And in exactly the form that made him a 58-26 pitcher in the 3 1/2 seasons before his tendinitis.

Throughout the Orioles' improbable streak since Aug. 20, the condition of his pitching arm has endangered their chances of a prolonged pennant push. Throughout a winless August, McGregor's condition worsened until, in his last two starts, his fast ball was indistinguishable from his change-up. In both games, McGregor never got an out.

Finally, a fortnight ago, McGregor admitted the tendinitis was severe and that his 9.36 ERA in six previous starts was killing his team. At last, he rested for a week, never touching a ball, letting the inflammation die.

If it would.

Today, in Yankee Stadium, a worried and tentative McGregor took the mound, wondering if he would get anybody out; wondering even if this might be his last game of 1982.

McGregor walked the first batter on four pitches and Weaver, who had removed him after just 12 pitches last time, stalked to the mound. It seemed McGregor's hopes, and perhaps the Orioles' as well, were within a hair's breadth of snapping.

"I was close to takin' him out before the game ever started. And when I went out to the mound, I was within two hitters of getting him," Weaver admitted. "He looked defensive. I told him, 'Whatever's gonna happen is gonna happen. Just be yourself. Pretend like it's batting practice.' "

McGregor then watched a hit-and-run ground smash find its way into the glove of third baseman Rich Dauer. "The glove made a good play," said Dauer.

Ken Griffey popped out and Dave Winfield, with six homers in his last seven games, missed a fast ball, then a change-up, to end the inning. At that point, this game -- and, to a degree, this phase of the Oriole season -- took a shift in tack.

"It felt like it had life in it," said McGregor of his arm. "It's on the way. I had good stuff. I just have to get the strength back to go nine innings.

"You can become defensive, or afraid. And when you're pitching well, you're always bold as can be."

Above all, it was a bold Oriole team that left Yankee Stadium today, convinced its pitching is finally, after a season of waiting, at full and functioning strength.