The All-Star closer worked the ninth for his 33rd save, and the Dodgers edged the division-leading Arizona Diamondbacks 3-2 on Friday night.
Los Angeles moved within a game of Arizona, while Colorado dropped 1 1/2 games back after a 7-0 loss in San Diego.
"Every game counts," Jansen said. "That's motivation. That's what fuels me."
Jansen had been shaky since coming off the disabled list, allowing seven earned runs in four innings over four appearances. He was sidelined by an irregular heartbeat.
Helped by pitching coach Rick Honeycutt, he worked out some mechanical issues during a bullpen session in Texas earlier this week. He also watched video of himself from the last two years.
"I feel great," Jansen said. "Just got to figure it out."
"That was huge," teammate Justin Turner said of Jansen. "He looked pretty electric."
Turner homered on Zack Greinke's first pitch of the eighth inning for the go-ahead run in his fourth at-bat against his former teammate.
"Got a slider he left up, one of the few he left up all night," Turner said.
Enrique Hernandez tied it at 2 with a pinch-hit, two-strike, opposite-field homer off Greinke with two out in the seventh.
Dylan Floro (5-3) got the win with one strikeout in one inning of relief.
Greinke (13-9) gave up six hits in 7 1/3 innings. He struck out five and walked one.
"I've been feeling good for the past month at least, maybe longer late in games, to where I've felt like I could pitch a whole other game," Greinke said. "Today was one of those. I felt really good."
Goldschmidt slugged a two-run shot, his team-leading 31st of the season, in the first. Goldschmidt has reached base in 43 straight road games, extending his club record.
Joc Pederson's RBI single in the third left the Dodgers trailing 2-1.
The D-backs had the potential go-ahead run on third base in the eighth. Ketel Marte reached on an error by Floro, got sacrificed to second by Greinke and took third on Floro's wild pitch. But Steven Souza Jr. grounded out to Floro to end the inning.
Diamondbacks: RHP Shelby Miller (right elbow tightness) played long toss with a plan to increase his workload next week. ... OF Jarrod Dyson (right groin strain) was set to have three at-bats in a game with Triple-A Reno on Friday night.
Dodgers: RHP John Axford (right fibula fracture) is off crutches and playing catch in Arizona, but has yet to throw a bullpen or face hitters. ... RHP Ross Stripling (low back inflammation) threw a bullpen and came out of it well. The team has yet to decide on a plan for him.
FREESE IN LA
In the ninth, the Dodgers announced they had acquired third baseman David Freese from the Pirates in exchange for minor league infielder Jesus Manuel Valdez.
"Definitely happy to have him," Turner said. "He's a professional hitter. I love watching him take his at-bats."
Manager Dave Roberts said Freese would be used off the bench against left-handed pitching.
HOT AUGUST NIGHTS
Turner went 2 for 3 and got hit by a pitch. He finished August hitting .402 with 22 runs, 11 doubles, one triple, six homers and 20 RBI in 25 games.
GOLDY VS LA
Goldschmidt's homer was the 31st of his career against the Dodgers, most among active players vs. Los Angeles. He finished 2 for 4 with a double.
Patrick Corbin (10-5, 3.15 ERA) starts for the Diamondbacks against fellow lefty Clayton Kershaw (6-3, 2.39 ERA). Corbin is 1-0 with a 0.98 ERA in three starts against the Dodgers this season. Since the All-Star break, Kershaw is 3-1 with a 1.85 ERA, 46 strikeouts and three walks.
More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports
Dodgers closer Kenley Jansen set for Nov. 26 heart surgery
Dodgers closer Kenley Jansen is expected to be ready for spring training after surgery to correct his irregular heartbeat. The surgery, which had been expected, has been scheduled for Nov. 26, with recovery time anywhere from two weeks to eight weeks.
Red Sox re-sign Series MVP Steve Pearce on 1-year, $6.25M deal
World Series hero Steve Pearce will be back in a Red Sox uniform in 2019. Boston re-signed the journeyman 1B for a reported $6.25 million. "We all saw what kind of impact he can have," GM Dave Dombrowski said of the improbable World Series MVP.
Rangers hire Julio Rangel to handle pitching staff
Julio Rangel has been hired by the Texas Rangers as pitching coach for new manager Chris Woodward.
Phillies owner: Ready to spend money 'and maybe be a little bit stupid about it'
Phillies owner John Middleton said he is ready to spend big in free agency after coming off a 2018 season in which the team contended for the National League East title before a late swoon.
Orioles name Mike Elias as GM
Mike Elias spent the past three seasons as the Astros' assistant general manager where he led the team's domestic and international scouting efforts.
For many players, this will be a long, cold winter
From veterans coming off one-year deals to all the available relievers -- so many relievers! -- the wait is on for offers that might never come.