The longest extra inning game in Major League Baseball history was in 1984 when the Chicago White Sox and the Milwaukee Brewers played 25 innings. It took 8 hours and a few odd minutes. Chicago won, 7 to 6. This was also the longest game on record.

There was a game in 1920 between Brooklyn and Boston which lasted 26 innings prior to being called as a 1-1 tie on account of darkness. There's no record of how long that game lasted, but I bet lots of soap was required in the locker room afterwards.