Matt Szczur’s single was enough to send Starlin Castro in for the winner but it came in bizarre circumstances as right fielder Gregory Polanco inexplicably slipped as he was heading to catch the ball.
The Cubs had earlier led 7-1 and 10-5 but the Bucs fought back to force the extra innings.
Adrian Beltre had a big night as he hit his 400th career home run but it did not help the Texas Rangers as they fell to an 8-3 defeat to the Cleveland Indians.
Texas are now five games back in the American League West after the Tribe claimed just their 13th win of the campaign.
Clayton Kershaw gave up three runs in pitching his 100th career win as the Los Angeles Dodgers beat the Colorado Rockies 6-4.
The Rockies have just 12 wins this season and trail the Dodgers by 9.5 games in the National League West.
The Dodgers’ city neighbours the Angels were also winners on Friday as they beat the Baltimore Orioles 3-1 while another Californian outfit, the San Francisco Giants, beat the Cincinnati Reds 10-2.
Nelson Cruz hit a walk-off single to hand the Seattle Mariners a 2-1 win over the Boston Red Sox and the Philadelphia Phillies made it three wins in a row with a 4-3 victory over the Arizona Diamondbacks.
The Washington Nationals claimed a big win as they hammered the San Diego Padres 10-0 and the New York Mets were also kept off the scoreboard as they went down 7-0 to the Milwaukee Brewers.
In the day’s other games, the Atlanta Braves beat the Miami Marlins 5-3, the Kansas City Royals upset the New York Yankees 12-1, the Minnesota Twins were 3-2 winners over the Tampa Bay Rays, the Houston Astros beat the Toronto Blue Jays 8-4, the Detroit Tigers claimed a 10-4 win over the St Louis Cardinals and the Chicago White Sox beat the Oakland Athletics 7-6.