Cody Bellinger's walk-off shot in the ninth inning, his second homer of a frustrating season, lifted the Dodgers to a 3-2 victory over the Chicago Cubs.