Cruz ripped the first pitch from Chad Gaudin (0-4) into the Rangers' bullpen to give Texas its second win over the Yankees in six games this season. The AL West-leading Rangers trailed 4-1 in the third.
The Yankees lead over Tampa Bay in the East slipped to 1½ games. The Rays beat Toronto 9-8.
Scott Feldman (7-10), the 11th Texas pitcher, worked the 13th for the decision.
New York loaded the bases with two outs in the 13th, but Chad Moeller flied to center. The Yankees had a runner on third with one out in the 12th after Moeller doubled into the right-field corner and advanced on Brett Gardner's sacrifice bunt.
But Derek Jeter, who was 1 for 7, was retired on a weak groundout, and Colin Curtis struck out swinging.
Alex Rodriguez's two-run double keyed a four-run fourth for the Yankees, who'd won nine of their previous 12.
No. 9 hitter Julio Borbon had a career-high four RBIs for the Rangers.
Cruz tied it at 5 when he led off the eighth with a towering first-pitch homer to left off Joba Chamberlain.
Yankees starter Javier Vazquez allowed four runs and six hits in five-plus innings.
The Rangers appeared to get a break in the second when Ian Kinsler attempted a steal of second base.
Francisco Cervelli's throw beat Kinsler, and replays showed shortstop Derek Jeter tagging Kinsler on the wrist. Second base umpire Alfonso Marquez called Kinsler safe, prompting an argument from Yankees manager Joe Girardi.
Kinsler later scored from third on Borbon's groundout to put Texas in front.
The Yankees struck back against C.J. Wilson in the third on Rodriguez's two-run double, and RBI singles from Marcus Thames and Cervelli.
Rodriguez had been 0 for 12 against Wilson, the most hitless at-bats against any pitcher in Rodriguez's 17-year career.
Wilson, the Rangers' leader in victories, allowed four runs and six hits in three innings, his shortest outing of the season.
In the fourth, Borbon robbed Nick Swisher of extra bases with a leaping catch at the wall in center field, and Borbon's two-run double in the bottom of the fourth pulled Texas to 4-3.
Mark Teixeira's bases-loaded walk off Pedro Strop in the sixth for his 100th RBI of the season made it 5-3, but Borbon's RBI groundout in the bottom half reduced the deficit to one run.
NOTES: The previous Rangers record for pitches used in a game was 10 against Boston in 1993. ... Rangers SS Elvis Andrus returned after missing five games with a tight right hamstring. ... Texas OF Josh Hamilton, who leads the majors with a .361 batting average, was out for a sixth consecutive game due to a bruised right ribcage. ... Yankees C Jorge Posada did not catch for the second straight game because of post-concussion symptoms. But he pinch-hit in the 13th. Posada said he was ready to go back behind the plate, but Girardi is being cautious, saying Posada won't catch again until at least Sunday's series finale. Posada was struck in the mask with a foul tip Tuesday night against Baltimore. ... Girardi said LHP Andy Pettitte will make one more rehab start before rejoining the rotation. Pettitte has been on the 15-day DL since July 20 with a strained left groin. ... Reggie Jackson visited the Yankees' clubhouse before the game and watched some of the game from the owner's box with Rangers president Nolan Ryan. ... Kinsler was ejected in the 10th by home plate umpire Dale Scott for protesting a called third strike.