The PSV Eindhoven forward, winning only his sixth cap, scored twice and hit the crossbar before setting up the fourth goal for substitute Klaas Jan Huntelaar.
Young defender Bruno Martens scored his first international goal, rendering Balazs Dzsudzsak's eighth-minute penalty, an equaliser at the time, irrelevant in the final analysis.
Van Gaal has marked the start of his second spell in charge by giving opportunities to a host of new faces and two them combined for the opening goal in only the third minute. Luciano Narsingh crossed from the right and PSV team-mate Lens headed home from six yards.
But Hungary were soon on level terms courtesy of a former PSV player. Jordy Clasie brought down Zoltan Gera in the penalty area and was booked, and Dzsudzsak stroked home the resulting spot-kick.
Narsingh and Robin van Persie won free-kicks in dangerous positions but Wesley Sneijder failed to take advantage, hitting the wall with his first effort and shooting wide soon afterwards.
But the Inter Milan player fared better from a set-piece wide on the left in the 18th minute. Zsolt Korcsmar was booked for bringing down full-back Jetro Willems and Sneijder swung the free-kick into the box for Martens to head home.
Clasie and Lens both drew saves from home goalkeeper Adam Bogdan before Sneijder wasted another free-kick, firing over the bar after Roland Juhasz fouled Van Persie and was yellow-carded. Dzsudzsak talked his way into the book after Akos Elek fouled Narsingh but there was no further goalmouth action before the interval.
Van Gaal replaced Van Persie with Huntelaar at half-time, with Hungary introducing Tamas Hajnal in place of Vladimir Koman. The Dutch soon made it 3-1 when Lens tucked away his second of the game, and third for his country, from 12 yards eight minutes after the restart.
Huntelaar ends the scoring
Hungary enjoyed a spell of pressure after the goal, but Dzsudzsak's free-kick was out of the Sneijder playbook and into the wall. Maarten Stekelenburg denied Tamas Priskin from close range and substitute Hajnal shot over from 20 yards.
Both teams made substitutions shortly after the hour mark, with Adam Gyurcso introduced for Elek before the experienced Joris Mathijsen took the place of Martens.
The woodwork denied Lens a hat-trick when his left-footed shot from the edge of the box was a couple of inches too high. Defensive walls were proving a hazardous place to be, with Sneijder again failing to get the elevation needed on a 25-yard effort.
The Netherlands were home and dry in the 74th minute, though, with the impressive Lens turning provider for Huntelaar to score from six yards. Adam Maher stepped off the bench for his first competitive international in place of Kevin Strootman and quickly collected a yellow card for dissent after fouling Dzsudzsak.
Huntelaar shot wide in stoppage time as the Netherlands finished the match on the front foot on their way to a second successive win in Group D.