It was both players' first goals at under-21 level which looked to put the Scots in easy street, but Andras Rado reduced the deficit with a penalty in the 67th minute before grabbing a second with three minutes remaining.
With three games left in Group 3, Stark's side sit fourth after five games, six points adrift of leaders Slovakia - who have played a game more - and three behind the unbeaten Dutch, who have played a match less.
Stark admitted three wins will be needed to qualify for the finals next summer but they will need more resilience than they showed on Tayside although the coach will point to the plethora of subsitutions he made as a reason for their second-half performance.
St Mirren's Sean Kelly and Craig Slater of Kilmarnock made their debuts in the starting line-up but there was to be several more new faces before the end of the night.
Hungary looked dangerous early on but a challenge in the eighth minute by defender Botond Barath on Callum Paterson had the home fans appealing unsuccessfully for a penalty.
At the other end, Scotland keeper Jordan Archer had to rush from his goal to foil Hungary striker Patrik Bacsa and there was little between the teams until the home side scored after Paterson had been fouled by Hungarian stopper Patrik Poor just outside the box.
Kenny McLean and McGregor stood over the ball but it was the latter who drilled it underneath the jumping defensive wall and past keeper Levente Jova who might have been expected to stop it.
The game was held up for a moment or two after the half-hour mark as dozens of latecomers of a 4,537 crowd streamed out of the almost-packed lower George Fox stand and into the stand behind the goal where they had a perfect view of Scotland's second goal which came in the 37th minute.
McGregor put Armstrong in behind the Hungary defence with a clever pass and when he rolled the ball across the box Ryan Fraser had the easiest of tasks knocking it past Jova.
Stark replaced Archer, Kelly and Armstrong with keeper Chris Kettings, Joe Chalmers and Sam Stanton respectively - the latter two making their debuts - for the start of the second-half.
With nothing much happening in the way of excitement, Jack Grimmer and John McGinn also came on for their debuts, replacing Slater and McLean and unsurprisingly there was a disjointed look about Stark's side as the visitors took control.
Hungary found themselves right back in the game when Chalmers was penalised for hand ball inside the box as he looked to concede a corner and Rado slammed the spot-kick high past Kettings.
As the Hungarians pushed for the equaliser Balint Vecsei fired wide from 12 yards and Rado also missed the target from a similar range.
In between, Danny Handling was given his debut when he and John Herron came on in the 76th minute for Fraser and Paterson but almost inevitably, with three minutes remaining, Rado took a pass from Istvan Kovacs, turned inside and flashed his shot from 10 yards into the far corner for the deserved leveller.
- Sports & Recreation
- Ryan Fraser