Both teams have eight points in the fight for the second spot in Group E, trailing leaders Belgium with 16, but Wales have one more game in hand. Ramsey, who took over the captain's armband from the injured Gareth Bale, opened the scoring on 36 minutes following a Neco Williams cross as the Czechs were slow to return after a corner. James narrowly missed the cross in front of the goal, but Ramsey picked up the ball, fooled Czech goalkeeper Tomas Vaclik and found the empty net.
The Czechs were level a minute later when goalkeeper Danny Ward cleared a half-shot, half-pass from Filip Novak and Jakub Pesek was ready with a rebound.
The hosts went ahead owing to a farcical own goal on 49 minutes as Ramsey back-passed, but Ward was not ready and the ball rolled over his foot and slid in at the lefthand post. James equalised for Wales on 69 minutes as he blasted the ball past Vaclik following a superb pass into his run from second-half substitute Harry Wilson. A minute later, Vaclik denied Ramsey with a good save following another Wilson pass.
The Czechs had the first clear-cut chance of the game on eight minutes, but Ward pulled a superb save to deny Adam Hlozek on the ground. Ten minutes later, Wales almost went ahead but Vaclik denied Kieffer Moore in a one-on-one. Moore threatened with two headers in the second half, but Vaclik stopped the first one on the line and the second one went wide.
Wales travel to Estonia next while the Czechs face Belarus on a neutral ground in Russia with both games scheduled for October 11.