With Senegal missing injured star man Sadio Mane and the Dutch without their main attacking threat Memphis Depay at kick-off, the Group A encounter in Doha looked set to end in a goalless draw.
But with just six minutes remaining PSV Eindhoven forward Gakpo got up in front of Senegal goalkeeper Edouard Mendy to head in a floated Frenkie de Jong cross from the left.
Substitute Klaassen then secured the victory deep in injury time, following up to score after Mendy had saved from Depay, who had also come off the bench.
The result leaves the Netherlands level at the top of the group with Ecuador, who beat hosts Qatar 2-0 in the tournament's opening match on Sunday.
Louis van Gaal's side play Ecuador on Friday, while Senegal now face a must-win contest against Qatar.
Senegal saw Bayern Munich superstar Mane -- who came second in this year's Ballon d'Or -- pull out of the squad with a leg injury on the eve of the tournament.
His absence was clearly felt as the contest at Al Thumama Stadium -- played out to the backdrop of the non-stop drumming and dancing of the Senegal support, but also in front of a considerable number of empty seats -- never lived up to its billing.
Everton midfielder Idrissa Gana Gueye came closest to scoring for Senegal with a strike on the half-volley from the edge of the box that was beaten away by Netherlands goalkeeper Andries Noppert in the 73rd minute.
Noppert, the giant Heerenveen goalkeeper who was making his international debut, also excelled with saves from Boulaye Dia and Pape Gueye in the second half as the Netherlands played their first World Cup game in eight years.
The three-time runners-up were semi-finalists under Van Gaal in Brazil in 2014 before failing to qualify for the last World Cup in Russia in 2018.
The Dutch team was captained by Virgil van Dijk, who was making his debut at a major international tournament on the occasion of his 50th cap.
With Matthijs de Ligt and Nathan Ake alongside him, they were mostly comfortable at the back but had created little going forward before Barcelona forward Depay -- who scored 12 times in qualifying -- came on for the final half-hour.
With Depay not able to start after spending two months on the sidelines, it fell to former Tottenham Hotspur striker Vincent Janssen to spearhead the Netherlands attack but he failed to make a major impact.
Yet Gakpo finally broke the deadlock and, as Senegal pushed for an equaliser, Depay played his part in Ajax midfielder Klaassen's goal that clinched the points in the ninth added minute.
This story has been published from a wire agency feed without modifications to the text. Only the headline has been changed.