Burnett (4-6) was working on a two-hit shutout when he allowed a single to Anthony Rizzo and a two-run homer to Alfonso Soriano in the ninth, but otherwise was nearly untouchable in notching his first win since May 3.
The right-hander went 8 1/3 innings, walking three and striking out five as the Pirates clinched their three-game series.
Alvarez put the Bucs ahead to stay with a second-inning RBI single and added a two-run homer in the fourth, while Russell Martin also provided a round-tripper with a man aboard for Pittsburgh.
Cubs starter Jeff Samardzija (3-7) was touched for four runs on eight hits over six frames.
Boston schools pull out free condoms over wrapping complaints
Aaron Carter is still in love with Hilary Duff