The Mountaineers (22-10) have won their last three games, including tournament upsets of No. 19 Oklahoma and Texas in the Big 12 Championships. West Virginia has reached the conference title game for the first time since 2014 and faces top-seeded Baylor (30-2), No. 2 in the AP top 25 Women's poll, on Monday.
Martin made 10 of 21 shots, including four from 3-point range, and her 3-point play with 4:45 left put West Virginia ahead for good, 53-51. Teana Muldrow nailed a 3-pointer with about four minutes left, pushing the lead to 56-52 and Martin followed with another jumper.
Martin sank two free throws to make the lead 60-56 with 14 seconds left but Texas roared back with a Brooke McCarty 3 to make it a one-point game at just under 10 seconds.
Ray made her clinching free throws with six seconds left, and McCarty missed a final trey.
McCarty led Texas (23-8) with 13 points, Ariel Atkins 12.