Ramirez gave the White Sox a 1-0 lead with a first-inning RBI single, then put Chicago ahead for good at 2-1 with a run-scoring double in the third.
The White Sox shortstop added added a solo homer in the fifth as Chicago took a third straight from the Twins to close out a four-game series.
Avisail Garcia and Jeff Keppinger each added an RBI for the winners.
Hector Santiago (4-7) logged his first victory since June 21, controlling Minnesota on two runs (one earned) on nine hits and two walks n a six-inning effort. He struck out one.
Addison Reed hurled a scoreless ninth for his 31st save.
Samuel Deduno (7-7) was hung with the loss, surrendering five runs on eight hits over five innings.
Josh Willingham and Oswaldo Arcia each drove in a run for the Twins.