With Senegal missing injured star Sadio Mane and the Netherlands missing their main attacking threat Memphis Depay at kickoff, the Group A clash in Doha appeared destined to end in a goalless draw.
PSV Eindhoven forward Gakpo got up in front of Senegal goalkeeper Edouard Mendy with just six minutes remaining to head in a floated Frenkie de Jong cross from the left.
Substitute Klaassen then sealed the win in injury time, scoring after Mendy had saved from Depay, who had also come off the bench.
The result ties the Netherlands for first place in Group A with Ecuador, who defeated hosts Qatar 2-0 in the tournament’s opening match on Sunday.
The Netherlands play Ecuador on Friday, while Senegal now faces a must-win game against Qatar.
Senegal saw Bayern Munich superstar Mane, who finished second in this year’s Ballon d’Or, withdraw from the squad on the eve of the tournament due to a leg injury.
His absence was clearly felt as the match at Al Thumama Stadium – played against the backdrop of non-stop drumming and dancing from the Senegal crowd, but also in front of a significant number of empty seats – fell short of expectations.
Everton midfielder Idrissa Gana Gueye came closest to scoring for Senegal in the 73rd minute with a half-volley from the edge of the box that was saved by Netherlands goalkeeper Andries Noppert.
Noppert, the giant Heerenveen goalkeeper making his international debut, also excelled in the second half with saves from Boulaye Dia and Pape Gueye as the Netherlands played their first World Cup game in eight years.
The three-time runner-up were semi-finalists in Brazil in 2014 under Van Gaal before failing to qualify for the 2018 World Cup in Russia.
Virgil van Dijk captained the Dutch team, making his debut at a major international tournament on the occasion of his 50th cap.
They were mostly comfortable at the back with Matthijs de Ligt and Nathan Ake alongside him, but had created little going forward before Barcelona forward Depay — who scored 12 goals in qualifying — came on for the final half-hour.
With Depay unable to play after being sidelined for two months, former Tottenham Hotspur striker Vincent Janssen was tasked with leading the Netherlands attack, but he failed to make an impact.
Nonetheless, Gakpo broke the deadlock, and as Senegal pushed for an equaliser, Depay assisted Ajax midfielder Klaassen’s goal in the ninth added minute.