Trailing 1-0 entering the fourth, the Mets scored four times to grab control of the contest.
Daniel Murphy and Justin Turner each singled with one out and Kirk Nieuwenhuis drew a walk to load the bases. Nickeas then delivered a two-run hit to shallow right-center field, chasing Diamondbacks starter Patrick Corbin (1-1).
Josh Collmenter relieved and, after Johan Santana laid down a sacrifice bunt to put two runners into scoring position, Torres chased them home with his own two-run single for a 4-1 Mets lead.
Santana (1-2) earned his first win of the season, yielding three runs on nine hits over seven innings as New York snapped a four-game losing streak.
Paul Goldschmidt drove in a pair of runs for Arizona.