The Pirates grabbed a 3-2 lead in the eighth on Marlon Byrd's two-out RBI double, but the Brewers came back in the next half-inning when Jean Segura collected a run-scoring single against Vin Mazzaro (7-2).
Pittsburgh, however, settled things in the ninth when Snyder, batting for Mazzaro, smashed a pitch from Jim Henderson (3-5) onto the porch in right-centerfield with none out.
Mark Melancon retired Milwaukee in the ninth for his 11th save, assuring the National League Central-leading Pirates of finishing .500 or better for the first time since 1992.
Jonathan Lucroy knocked in a pair of runs for the Brewers.
UPI horse racing weekend preview
Bo Jackson: I can't help Jameis Winston anymore