Youkilis connected in the second inning, cutting into a 4-1 Texas lead, and Ramirez's homer capped the scoring for the White Sox, who broke open a close game with three runs in the ninth.
Alejandro De Aza put Chicago ahead for good with a two-run single in the fourth and Alex Rios added three RBI as the White Sox took the first of a three-game series between American League divisional leaders.
Chris Sale (12-3) went 6 1/3 innings to earn the victory, surrendering five runs on six hits. The left-hander walked two and struck out six for Chicago, which has won four straight.
Coupled with Detroit's loss to Toronto earlier Friday, Chicago extended its AL Central lead over the Tigers to 1 1/2 games.
Rangers starter Yu Darvish (11-7) was tagged for six runs (five earned) on eight hits through 6 1/3 frames.
Nelson Cruz went 2-for-4 with a three-run homer for Texas.