Josh Satin began the rally against Josh Collmenter (4-1) with a one-out double and John Buck was intentionally walked to set up a potential double play.
But Matt Harvey, batting for Aardsma, laid down a sacrifice bunt to move each runner up a base.
After Omar Quintanilla was intentionally walked, Brown lined a hit to left for the game-winning runs, and New York claimed the first of a four-game series.
Satin, who had forced extra innings with a ninth-inning RBI single, finished with three hits, as did Quintanilla and Marlon Byrd as New York banged out 16 hits.
Paul Goldschmidt homered and Aaron Hill went 3-for-5 with an RBI for the National League West-leading Diamondbacks.