The record for the longest winning streak in Major League Baseball belongs to the 1916 New York Giants, who won 26 consecutive games. This streak, however, included a tie, which was not counted in the streak.
The record for the longest winning streak not including a tie belongs to the Chicago Cubs. In 1935, the Cubs won 21 games in a row. In 2002, the Oakland Athletics came close to matching the Cubs' record but lost after 20 straight wins. For pitchers, the record for most consecutive wins belongs to Carl Hubbell, who won 24 games in a row during the 1936 and 1937 seasons. This streak might be better called "most games without losing," since it included 3 no-decisions.