Daniel Sturridge struck a stoppage-time winner as England came from a goal down to beat Wales 2-1 in Lens.
Fellow substitute Jamie Vardy had earlier cancelled out Gareth Bale's 35-yard free kick to leave the game on tenterhooks in the second half.
The late winner was a reward for the positivity of England manager Roy Hodgson, who had introduced both goal scorers at half time in a bid to spark a recovery following Bale's opener.
It should have needed something special for Bale to beat England goalkeeper Hart from such a distance when the Wales talisman was granted the opportunity to shoot following a clumsy Wayne Rooney foul on Hal Robson-Kanu. But simply getting the free kick strike on target proved to be enough for the Real Madrid forward, with Hart getting both hands to the shot but only managing to turn it on to the inside of his own post and in.
It was the one moment of danger in the entire first half from a Welsh side who struggled to get going, but Bale's strike changed the shape of the game and forced Hodgson into a double change at the interval.
Off went Harry Kane and Raheem Sterling, with Sturridge and Vardy coming on to try to give England more of a cutting edge.
And the switch seemed to work when Vardy tucked home from a couple of yards out after a lofted cross had come back off Ashley Williams to find the Leicester forward in an offside position.
It was just his third touch since coming on and his celebrations were wild, but it took until stoppage time for England to find the winner, when a clever poked finish by Sturridge beat Wayne Hennessey at his near post to send England to the top of Group B.
England had begun the match unchanged from the team that started the 1-1 draw with Russia on Saturday, and Hodgson's side controlled much of the first half, with Eric Dier and Dele Alli particularly influential in midfield.
Sterling should have opened the scoring but couldn't quite stretch enough to turn an Adam Lallana cross on target after seven minutes in the pick of England's first-half chances, while a penalty appeal was waved away when Kane's off-target header flicked the arm of Ben Davies, and Chris Smalling also went close when he met a Wayne Rooney corner on 36 minutes.
Wales had made three changes to their starting XI to introduce Wayne Hennessey, Joe Ledley and Robson-Kanu, but there was little encouragement for the Chris Coleman's side for much of the first half, until Rooney bundled over Robson-Kanu to give Bale a chance 35 yards from goal.
Bale disappeared under a pile of red-shirted bodies after seeing his free kick squirm beyond Hart, but Wales' lead only lasted until the 56th minute when Vardy pounced.
Hodgson threw everything at Wales in search of the win, bringing on Marcus Rashford for Adam Lallana to finish the game with a three-pronged front line, and the England manager received his reward as the travelling Welsh fans were silenced in northern France.
The result puts England a point above Slovakia and Wales at the top of Group B, but qualification is still wide open ahead of the final round of matches, with all four teams still able to qualify for the knockout stages.