SCOTTSDALE — Late last September, with the Giants in Los Angeles for their final series of the year against the Dodgers, Mac Williamson and Tim Federowicz struck up a conversation about hitting mechanics. Federowicz told Williamson that he had benefited from working with Doug Latta, a private instructor based not far from Dodger Stadium.

Williamson got a phone number for Latta and the next day they spent an hour discussing hitting philosophy. That night, Williamson went 3-for-3 and hit a home run off Clayton Kershaw.

“You know how superstitious baseball players can be …” Williamson joked this week as he described his new swing in the clubhouse at Scottsdale Stadium.

Superstition aside, it should come as no surprise that Williamson then signed up to work with Latta over the offseason. He liked what he heard that September day — regardless of the later results — and he knew it was time to get his career in gear. If Williamson is finally able to break through, another Dodgers star besides Kershaw will have an imprint on his story, too.

One of Latta’s most prominent success stories is Justin Turner, the third baseman who was released by the Mets at the age of 29 and then became a heart-of-the-order terror in Los Angeles. Williamson is trying to embrace many of the same markers in his revamped swing. The low hand placement. The high leg kick instead of the small step forward. The balance. The soft landing of his front foot. He’s trying to be shorter and more direct to the ball and keep his bat in the zone longer, which hopefully will allow his natural power to be on full display.

“In the past I’ve been really active with my shoulders and hands late in the swing instead of just going and attacking the ball,” he said. “I’m trying to just really calm down a lot of that non-essential movement.”

Williamson’s swing has been a source of frustration for Giants coaches in recent years. As he took batting practice one morning last summer, a member of the staff looked out at the field and groaned to beat writers. “Lift the ball,” he said, waving his hands animatedly at the field.

Williamson hit the ball on the ground 60 percent of the time last season, cutting off what he can do so well. In A-ball, he hit 25 homers and 31 doubles and looked like a future slugger in left field for the big league club. At Chase Field two years ago, Williamson hit a 460-foot blast that left a mark on the batter’s eye and teammates shaking their heads. But those successes have been few and far between overall.

Williamson is a .226 hitter with nine homers in 212 scattered at-bats over three big league seasons. He turns 28 this season and is part of a crowded outfield competition. The writing on the wall is clear.

“I’m not getting any younger,” Williamson said. “At some point you’ve got to have some success and figure it all out.”

The early results are encouraging. Bruce Bochy praised Williamson’s swing after the first weekend of games, when he hit a homer — coincidentally, against the Dodgers — and had a hard single. The new hitting coaches, Alonzo Powell and Rick Schu, have continued to help Williamson make adjustments. The previous regime did not take any offense to Williamson seeking outside help.

“He looks good,” said Hensley Meulens, who has moved from hitting coach to bench coach. “You can see the timing getting better and better. A lot of guys are doing that now, seeing their own guys in the offseason. If it’s going to help them it’s going to help us, so I didn’t have a problem with it.”

Williamson worked with Latta in the offseason while simultaneously training in Southern California with Matt Duffy, one of his closest friends. While a Turner-like breakout at some point would be great, he has set the immediate goal far lower. He knows he is likely headed to Triple-A Sacramento given the current outfield mix and the fact that he has one minor league option remaining, but he’s ready to keep working there with hitting coach Damon Minor.

“I feel really good but it’s still going to take some time to clean stuff up,” he said. “There are a lot of years of habits that I’m trying to break, so it’s not going to happen in a few weeks. The goal is to be the guy I want to be in a month or two.”