The Yankees have won three in a row and five out of six in a late-season push for a playoff spot. New York began the night 2 1/2 games behind Tampa Bay for the second wild card berth in the American League.
New York capitalized on an error in the fourth to make two of the runs in that inning unearned.
Ichiro Suzuki then reached when Johnson fielded a grounder and threw wildly to first base.
Lyle Overbay's double scored Rodriguez to snap a 1-1 tie and, one out later, Gardner came through with his triple that brought home Suzuki and Overbay.
An infield single by Robinson Cano with two away drove in Overbay with the fourth run of the inning.
New York held a 6-1 lead heading into the eighth, but the White Sox scored four times in hat inning and Mariano Rivera was brought in with two on and two out.
Rivera retired the only batter he faced in the eighth and then worked a perfect ninth for his 41st save.
He preserved the victory for starter CC Sabathia (13-11), who gave up three runs on five hits in 7 1/3.
Notable deaths of 2014 [PHOTOS]
Julius Randle breaks leg during NBA debut