The frame of mind to have for Sunday’s Jered Weaver-Clayton Kershaw matchup was pretty basic: Revel in two out-of-sight pitchers, and just hope for the best as far as that whole winning-and-losing thing.

The aces for the Los Angeles Angels and the Los Angeles Dodgers lived up to their advance billing, throwing matching shutouts the first six innings. The Dodgers twice got runners to third base with less than two outs, in the fourth and fifth innings, but the rallies withered on the vine (or, if you can imagine the fans’ reaction, withered on the whine).

In a fast-moving start, Kershaw needed only 26 pitches through three innings and 64 pitches through six. At one point, the Angels’ No. 3-6 hitters had struck out six times in eight at-bats. Plus, Kershaw, who previously this season had made at least two highlight-reel plays on bunts, made another brilliant one in the sixth inning, reaching to backhand a bunt by Weaver and then throwing across his body to double up Jeff Mathis at second base.

In the seventh, however, two bloops got the best of Kershaw. Erick Aybar hit one that a deeply positioned Tony Gwynn Jr. couldn’t reach, and Aybar didn’t stop running, sliding expertly around Gwynn’s offline throw for a double. Then, Howie Kendrick hit a shallow fly to center that Matt Kemp dove for and trapped. Kemp sprung to his feet to throw home, but it was not in time to get Aybar and prevent the first run of the game. Had Kemp played the ball straight up for a single, Aybar would have held at third, but it was close enough that you could understand Kemp’s efforts.

You’d be forgiven for thinking the Dodgers were done at that point, especially with two out and none on in the bottom of the seventh, but Kershaw (who had struck out nine but walked none and only thrown 84 pitches to that point) singled to give the Dodgers a baserunner (and raise his batting average to .297). Gwynn then shocked the Angels with a deep fly to right-center that went off a running Vernon Wells’ glove. Kershaw, running all the way with two out, scored easily on the triple to tie the game.

Vin Scully raised the point that the two-out running might affect Kershaw going into the next inning, and as if to underscore those fears, Kershaw hit Peter Bourjos to start the eighth. Bourjos then went to second when James Loney missed catching a pickoff throw by Dioner Navarro. But with the go-ahead run in scoring position again, Kershaw struck out Bobby Abreu (on a questionable check swing called by third-base umpire Chris Conroy, who ejected Matt Kemp on Saturday), then retired Maicer Izturis on a grounder to third.

Weaver left the game after seven innings and 110 pitches, allowing seven hits and one walk while striking out four, his ERA sliding to 1.97.

There was no doubt that Kershaw should go out for the ninth inning, and he easily retired the first two batters. But on a 3-2 pitch, Wells, who had struck out in his three previous at-bats, slammed Kershaw’s 112th pitch of the game into the left-field seats, a devastating blow on a day Kershaw had dominated. Following a game April 21 against the Braves, it was the second time this season Kershaw had given up a potential game-winning hit when he was one strike away from completing the ninth inning.

Kershaw retired Mark Trumbo on a grounder to finish his day: nine innings, two runs, six hits, no walks, 11 strikeouts … and one home run. Kershaw faced becoming the Dodgers’ eighth pitcher to lose in a complete game since 2000. On the homestand, he pitched 25 innings with 26 strikeouts (including back-to-back complete games with 11 strikeouts), 12 hits, three walks, three runs and a 1.08 ERA. Opponents batted .146 with a .186 on-base percentage and .244 slugging in 86 plate appearances.

Three outs from victory, Angels closer Jordan Walden walked Juan Uribe, who went out for pinch-runner Dee Gordon – who stole second on a close play with Navarro showing bunt. Walden then walked Navarro. Jamey Carroll sacrificed the runners to second and third.

Kershaw’s spot in the order came up, and perhaps you had a passing thought of using the team’s best bunter to try a game-tying squeeze. But, properly I’d say, Aaron Miles (6-for-11 as a pinch-hitter this season, 24-for-57 overall in June) pinch-hit. Miles fell behind 0-2, getting fooled in particular on the second pitch, low and inside.

With the count 1-2, Miles hit a shallow fly that no one but Gordon could try to score on. Bourjos caught it and fired home. Gordon raced home. Mathis blocked the plate, but Gordon seemed to manage to lean over Mathis and get his hand on the plate to tie the game. Incredibly.

Gwynn then came up with pinch-runner Trent Oeltjen on second base and a chance to win it.

On a 2-2 pitch, Gwynn lashed one to right field, a no-doubter hit — his third of the game — that easily scored Oeltjen and set off a huge celebration at Dodger Stadium, led by Kershaw and Kemp, who was the first to reach Gwynn and wrestled him down and practically began punching him in delight. A thoroughly riveting game from start to finish ended with a 3-2 Dodgers victory.

Thanks, we needed that.