The Dodgers rallied from five runs down late to beat the Pittsburgh Pirates 8-7 on Tuesday.