Second-half tries from Gareth Davies and George North staved off a fifth successive home loss for Wales, while England boss Steve Borthwick was given plenty to ponder before he names his World Cup squad on Monday.
Few players left lasting impressions, although there were good moments from first-five Smith and No 8 Alex Dombrandt.
Gatland praised his back rowers Aaron Wainwright and captain Jac Morgan, and North was also excellent.
Halfpenny led out Wales, who wore black armbands in memory of former Wales captain and coach Clive Rowlands following his death last weekend at the age of 85.
Wales suffered an early injury blow when hooker Ryan Elias was forced off after taking a blow to his right leg, with Dragons forward Elliot Dee replacing him.
Despite conceding 12 turnovers during the first 35 minutes - 22 in the match - England led 9-6 on penalty kicks after an error-ridden first half in which Wales debutant props Corey Domachowski and Keiron Assiratti struggled.
The game required a spark and Wales duly found one eight minutes into the second period.
First-five Sam Costelow’s kick found Wainwright, whose one-handed pass was collected by Morgan, who brushed off challenges from Joe Cokanasiga and replacement Jonny Hill before a supporting Davies touched down.
It was a try of outstanding quality and Halfpenny’s conversion opened up a four-point lead before Gatland made four changes.
The new arrivals included debutants Taine Plumtree, son of former All Blacks assistant coach John, and former England prop Henry Thomas, who qualified for Wales through his father.
Borthwick also rang changes, introducing international newcomers Theo Dan and Tom Willis as England looked to reassert themselves in the contest.
But Wales were transformed, and North’s 45th test try put them 11 points ahead going into the last quarter.
Wales were inches from adding a third try during the closing minutes, but wing Louis Rees-Zammit knocked on behind the line under pressure from England fullback Freddie Steward.
The teams meet again next Sunday at Twickenham.