The Red Raiders blew a 14-point first-half lead and trailed at halftime before bouncing back to follow up their win over No. 12 Baylor, the biggest under first-year coach Tubby Smith.
Texas Tech (10-8, 2-3 Big 12) also snapped a 12-game road losing streak dating to its win at TCU last season.
Karviar Shepherd had a career-high 15 points and Amric Fields also scored 15 for TCU. The Horned Frogs (9-8, 0-5) shot 20 percent and remained the only Big 12 team without a conference win.
Trailing 24-23 at halftime, Texas Tech went back in front for good on Kravic's layup 15 seconds into the second half.
Hannahs put the Red Raiders up 39-34 with a 3-pointer from several feet behind the arc with the shot clock about to expire midway through the second half.
The sophomore guard made both his shots from long range and was 7 of 7 from the line, including a pair of free throws after Shepherd was called for a TECHnical foul for hanging on the rim after a missed dunk in the first half.
A three-point play by Jaye Crockett pushed Tech's lead to six at 42-36, and TCU didn't get closer than four until Shepherd converted a three-point play for a 51-48 Tech lead with 1:34 left.
Robert Turner, who had 12 points, hit a driving layup to push the lead back to five as Texas Tech won two straight in the Big 12 for the first time since February 2011.
TCU missed 18 of its first 19 attempts from the field - including a couple of dunks - and shot 21 percent in the first half but led 24-23 thanks to a 14-0 run before halftime.
Kyan Anderson's 3-pointer put TCU at 2 of 20 on field goals before Fields hit consecutive shots in close to get the Horned Frogs within 23-19. After two free throws by Shepherd, Brandon Parrish hit a 3-pointer from the right wing to put the Horned Frogs ahead for the first time.
The Red Raiders couldn't hold a 22-8 lead and went without a field goal for the final 9 1/2 minutes of the first half. Their last bucket came on an alley-oop dunk from Crockett to Jordan Tolbert moments after Tolbert missed a desperation 3 at the shot-clock buzzer.
TCU had just one field goal in the first 16 minutes but stayed close by making free throws. The Horned Frogs were 12 of 14 in the first half, including 5 of 6 from Fields, who led all scorers before halftime with nine points.Shepherd missed an easy dunk after an offensive rebound, and was given a technical foul for hanging on the rim. Later in the first half, Jarvis Ray went up for a breakaway slam but jammed the ball against the rim with his left, non-shooting hand.