The Netherlands finished top of Group A and ended the home World Cup campaign with a third straight defeat.
They were the first host nation to exit the tournament with three group-stage losses.
The Dutch, who failed to qualify four years ago, will play the team that finishes second in the group in the last 16 games.
The team that finishes top of the group will face the African champion in the knockout stage.
In all three of the Netherlands' group games, Gakpo has scored the opening goal, driving forward and rasping a finish into the net.
Ismaeel Mohammed's shot on the stretch from outside the area was straight at Andries Noppert.
After Memphis Depay's shot was saved, Frenkie de Jong poked the ball into the net at the start of the second half to put the game out of reach.
Steven Berghuis' goal was ruled out and he also hit the bar.
Four years ago, the Netherlands watched on from home, but are now reminding people of their qualities.
The spine running through their side is a formidable one, marshalled at the back by Virgil van Dijk - their captain - pass master De Jong in the center of the park and cool scorer Gakpo up top.
The PSV player became the first Dutch player to score in his first three World Cup games when he finished off a team move.
With each impressive performance, Gakpo's price tag will increase and he has been heavily linked with a move to Manchester United.
He has scored 35 goals in 29 games and provided 18 assists for his club and country.
With a group of boisterousQatar fans behind the goal looking to rouse their team in the second half, De Jong shattered any expectations by poking in his first World Cup goal on 49 minutes.
It could have been worse for the hosts if Berghuis' goal had been ruled out for Gakpo's handling in the build-up, and the substitute's curling effort hit the bar.
The captain's long-range strike was gathered by Noppert, while PedroMiguel volleyed over from a corner.
The host nation of the World Cup gave up seven goals, the most by any of them.
With the number of teams going up from 32 to 48 for the next finals in six years' time, Qatar can look forward to trying to qualify in their own time.
Get the latest results and goal notifications for any team at the Fifa World Cup by downloading the BBC Sport app: Apple - Android - Amazon
You can get a daily dose of the World Cup on the radio.