A.J. Burnett and Mariano Rivera altered the mood in the Yankees’ universe last night better than any drug could have.

Armed with a filthy curveball he was able to throw for strikes, Burnett earned his October pinstripes by allowing the Phillies a run and four hits across seven innings, and Rivera supplied two shutout innings of relief as the Yankees evened the World Series with a 3-1 Game 2 victory before a Yankee Stadium crowd of 50,181.

With the best-of-seven Series tied 1-1, Game 3 is tomorrow night in Philadelphia, where Andy Pettitte opposes Cole Hamels, last year’s World Series MVP the Phillies were wary of pitching in The Bronx.

Instead they went with longtime Yankees villain Pedro Martinez, who allowed three runs and six hits in six-plus innings despite not feeling very well.

“It means a lot,” Burnett said of his gem. “After [Game 1] I wanted to set the tone early and be aggressive.”

Signed to a five-year, $82.5 million deal to play second fiddle to CC Sabathia in the Yankees’ revamped rotation, Burnett pitched like an ace.

The lone run was tainted because Alex Rodriguez failed to make a play on Matt Stairs’ two-out grounder in the second inning that scored Raul Ibanez, who had reached on a double that hit right along the foul line.

Mark Teixeira halted a long slump with a solo homer in the fourth off Martinez that tied the score 1-1. Hideki Matsui, who was 30 minutes late for batting practice because of thick traffic, according to Joe Girardi, put the hosts ahead 2-1 in the sixth with a homer to right on a 74-mph curveball at 1-2.

“He threw two curveballs and the second one was a little inside and I made the adjustment,” Matsui said. “Fortunately, it ended in a good result.”

Rivera allowed two runners to reach in the eighth with one out and then fed Game 1 hero Chase Utley a 4-6-3 double-play ball, though replays showed Utley may have been safe. Rivera recorded the final three outs to hike his postseason record save total to 38.

“I had an idea tonight that definitely I would have a chance to be there for two innings,” said Rivera, whose last outing was Sunday in the ALCS clincher against the Angels when he also worked two innings.

Jerry Hairston Jr., who started for an ice-cold Nick Swisher in right, led off the seventh with a single and pinch-runner Brett Gardner was running when Melky Cabrera laced a single to right.

With runners at the corners, no outs and the Yankees leading by a run, Girardi used Jorge Posada as the hitter for Jose Molina. Phils manager Charlie Manuel ignored Posada’s .183 (11-for-60) career average against Martinez (including 33 strikeouts) and summoned right-hander Chan Ho Park.

Posada’s single to center scored Gardner for a 3-1 lead, but the Yankees failed to pad the cushion. Curiously, Derek Jeter was bunting on three pitches — all strikes — and was out when he fouled off the third.

“I had [the bunt sign] on the first pitch, but I am not sure after that,” Jeter said. “With two strikes I shouldn’t have done that.”

Lefty Scott Eyre entered to face Johnny Damon and his liner landed in Ryan Howard’s glove — or at least that’s what the umpires ruled even though he appeared to trap it — to start an inning-ending double play.

The Yankees have scored four runs (three earned) in two games and yet are even with three tilts slated for Philly, where Matsui will be tethered to the bench because the DH won’t be in play.

“Winning tonight is very important, we didn’t want to go down two games going to Philadelphia,” Matsui said. “It only adds to the confidence we have.”