Trailing 2-1 in the sixth, Curtis Granderson drew a leadoff walk from Dillon Gee (4-4) and one out later Teixeira unloaded a blast to right field, putting the Yanks ahead to stay.
Granderson later added a solo shot fort the Yankees, who clinched their three-game rivalry series with the Mets and logged their 12th win in 16 games overall.
Hughes (6-5) held the Mets to two runs on six hits and two walks through 6 1/3 frames, striking out six.
Three Yankees relievers teamed up for 1 2/3 scoreless frames and Rafael Soriano racked up his ninth save in nine attempts.
Gee was touched for three runs on five hits over seven innings.