The Braves also traded left-hander Jo-Jo Reyes to the Blue Jays in the five-player deal while also adding left-handed minor league pitcher Tim Collins and minor league shortstop Tyler Pastornicky.
The 33-year-old Gonzalez was tied for fifth in the American League with 43 extra-base hits.
"He's an outstanding defensive shortstop and he's having a very good offensive season," Braves general manager Frank Wren said. "We think he can improve our run production. He immediately leads our team in home runs."
Troy Glaus had 14 homers to lead the Braves at the All-Star break.
Escobar hit .299 with career-best totals of 14 homers and 76 RBI last season but has struggled this year.
"We feel that Yunel Escobar will absolutely turn it around," Toronto general manager Alex Anthopoulos said.
"There's certainly an element of risk there, but we feel he has a very good opportunity to turn it around. I think if Yunel Escobar was doing what he did in the past, he's not available to us and this trade does not present itself."
Wren said Escobar could enjoy his best years after leaving the Braves.
"He very well may," Wren said. "He's a talented guy. But for our ballclub we felt we needed to make some adjustments. It just wasn't happening here right now."
The Braves also took on more salary. Escobar is making $435,000 this season. Gonzalez's salary is $2.75 million; his contract includes a 2011 club option for $2.5 million.
"Getting a guy we can control for a year and a half was important to us," Wren said.
Each shortstop is regarded as a strong defensive player.
"Alex may not be quite as flashy as Escobar, but he's an extremely solid shortstop," Wren said.
Wren said Gonzalez is expected to be with the team for tonight's game against Milwaukee.