The 6-foot-4 left-hander, who struggled through most of June, has pitched seven innings in each of his last two starts. He followed up on his seven-inning performance last Thursday ‘ in which two of his four earned runs came around to score after he left the game with a jammed hip ‘ with seven more frames of one-run ball Wednesday against the Padres at Fenway. Lester scattered six hits while issuing just a single walk, an improvement over walking three each of his last two times out, while striking out out five.

He was left with a no decision, but his performance was the most significant development for the Sox on a night when Jonny Gomes hit a pinch-hit, walkoff home run in the ninth to give the Red Sox a 2-1 win. It was the Sox’ eighth walkoff win of the year.

Lester labored through the first inning, throwing 32 pitches and allowing back-to-back-to-back singles with two outs to spot the Padres a 1-0 lead, but after that he settled down significantly. He averaged fewer than 12 pitches in the second through seventh innings. Even though the Padres beat him up when they were down to their final out of a given inning — they were 5-for-12 with two outs against the starter, 1-for-14 with fewer than two outs — Lester worked out of each jam.

The biggest step forward arguably came in Lester’s final inning. Starting the inning with 88 pitches, he struck out Yasmani Grandal before inducing a groundout off the bat of Pedro Ciriaco. Lester then ended his night by getting Alexi Amarista to watch three straight strikes — an 88 mph cutter, 73 mph curveball and an 85 mph cutter. All three painted the upper-left corner.

WHAT WENT RIGHT FOR THE RED SOX

— Gomes did it again. In a repeat of his June 18 feat against the Rays, he launched a walkoff home run to end the low-scoring affair in favor of the Red Sox. It is the team’s eighth walk-off victory of the season ‘ the last coming Sunday ‘ after doing so just three times in 2012. Indeed, the eight walkoff wins matches the most by the Sox in a single season since they had nine in 2006. According to Elias, the Sox now have their most walkoff wins in the first half of a season since 1953.

Gomes has represented an impactful bat off the bench. As a pinch-hitter this year, he’s now 5-for-13 with three homers and a line of .385/.500/1.154.

— The Red Sox didn’t score after Jacoby Ellsburyslapped a third-inning single down the left-field line to put runners on second and first with no outs, but it did extend his hitting streak to a modest 13 games. Since June 19, the start of the streak, Ellsbury is hitting .400 (22-for-55).

— John Farrell acknowledged before the game that it hasn’t exactly been easy getting Mike Carp playing time of late. “But when we can get him in the lineup,” Farrell continued, “he’s given us a potent left-handed bat capable of extra-base hits.”

That was exactly what Carp gave the Sox Wednesday night, his fourth game in 17 days. Carp went 2-for-4 with a double and a run scored ‘ Boston’s lone run until Gomes’ walkoff. Carp is hitting .316 in limited time this season.

— Junichi Tazawa was dominant in the eighth, his lone inning of work. Charged with facing the top of the San Diego lineup — Logan Forsythe, Chris Denorfia and Carlos Quentin — he struck out the side on 16 pitches (12 strikes). Quentin, who came to the plate a perfect 3-for-3, fanned when he was unable to check his swing on a slider in the dirt.

Closer Koji Uehara was not quite as effective in the ninth, but he got the job done. He used 18 pitches to induce two weak groundouts and a fly out to center to work around a walk.

WHAT WENT WRONG FOR THE RED SOX

– Getting runners to second base was not a problem for the home team Wednesday night. Getting them the final 180 feet, however, was. The Red Sox left nine runners on base and went 1-for-13 with runners in scoring position, the lone hit a Dustin Pedroia infield single in the first inning.

That trend proved particularly problematic in the third, when Jose Iglesias (hit by pitch) and Ellsbury (single) both reached with no one out. Shane Victorino‘s groundout moved them over, but Pedroia struck out, leaving men on second and third with two outs for David Ortiz. But with no clear protection behind the cleanup hitter, Padres starter Edinson Volquez intentionally walked Ortiz to face Daniel Nava with the bases loaded. Nava could muster only a groundout to shortstop to end the inning, leaving the Sox in what was, at the time, a 1-0 hole.

The Red Sox faced a similar scenario in the eighth, when Pedroia’s leadoff double triggered the Padres to intentionally walk Ortiz again. Nava struck out on three straight sliders. Carp flew out to center. Jarrod Saltalamacchia struck out on a 2-2 slider.

– Ortiz saw an eight-game hit streak (12-for-28, .429) come to an end at the expense of the BABIP gods, his 0-for-2 a loud 0-for-2, if there is such a thing. He hit two balls on the nose but right at Padres defenders. His first-inning liner, seemingly destined for center field, was snagged at shortstop by Ciriaco, who had been shading to the right. A fifth-inning bullet found left fielder Quentin. Both outs ended the inning.

– After falling behind before even stepping to the plate, the Red Sox had a chance to at least tie the score in the bottom of the first. Pedroia singled on a weak roller to third to move Victorino to third, then stole second with one out. But just as Ortiz lined a full-count fastball to the shortstop, Pedroia was off with the pitch, creating an easy unassisted double play for Ciriaco.