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
Mauer gives tearful thank you during retirement speech
Joe Mauer gives an emotional thank you to Terry Ryan for drafting him to the Twins back in 2001.
Joe Mauer officially bids Twins farewell in tear-filled news conference
Twins legend Joe Mauer formalized his goodbye to baseball on Monday at a tear-filled yet cheerful news conference to wrap up a 15-year major league career at age 35.
Ronald Acuna Jr. has flashed the talent to soon become NL's top player
While Shohei Ohtani and Ronald Acuna Jr. were named baseball's top rookies, the Braves outfielder has flashed the potential to quickly become one of the game's elite players.
Mariners deny ex-employee's claims of racism toward Latino players
The Mariners denied allegations made by a former employee that management called Latino players, especially those from the Dominican Republic, "dumb" and "stupid."
Braves' Ronald Acuna Jr. earns NL Rookie of the Year honors
Braves outfielder Ronald Acuña Jr. was named National League Rookie of the Year on Monday following a season that saw him hit .293 with 26 home runs and 64 RBIs in 111 games.
Angels' Shohei Ohtani beats Yankees' duo to win AL Rookie of the Year
Shohei Ohtani became the fourth Japanese-born player to win Rookie of the Year, as the Angels' two-way sensation beat out Yankees duo Miguel Andujar and Gleyber Torres for the American League award.