Borek Dockal put the hosts ahead midway through the first half but a 55th-minute equaliser from Stefan de Vrij looked set to give Holland a share of the spoils in Prague, only for Pilar to strike at the death.
The Dutch finished third at the World Cup in Brazil but have since seen Guus Hiddink replace Louis van Gaal as coach and his second spell as national coach had begun with a 2-0 friendly defeat to Italy last Thursday.
Here, without several of the Oranje’s World Cup stars, including Arjen Robben, Klaas-Jan Huntelaar and Ron Vlaar, he oversaw Holland’s first competitive defeat over 90 minutes since Euro 2012.
“It’s a bitter loss when you lose in the last minute,” said Hiddink, who started with the same 5-3-2 system the Dutch had used in Brazil but switched back to his favoured 4-3-3 after the first Czech goal.
“The system wasn’t an issue, the Czechs scored after individual errors on the right side. When the defence makes such mistakes, you can’t blame either of the systems we played today.
“The Czechs didn’t let us create many chances; we had some, but they didn’t let us score. We can only draw a lesson from this opening game.”
The visitors went behind in the 22nd minute when David Lafata found Sparta Prague team-mate Dockal, who scored with a superb left-footed volley from 18 metres that bounced off the post into the net.
De Vrij equalised in the 55th minute with a header that flew across the box and past Chelsea ‘keeper Petr Cech following a perfect cross from Manchester United new-boy Daley Blind.
But the hosts, who had failed to qualify for the World Cup, kept pushing and got the winner when Daryl Janmaat fumbled a header back towards his own goalkeeper Jasper Cillessen.
The ball hit the post, rebounded past a diving Cillessen, and Viktoria Pilsen winger Pilar had an easy job sending it into the gaping net.
It was a first win for the Czechs under Pavel Vrba, who took over as coach in January, and they will aim to build on it when they go to Turkey and Kazakhstan next month.
“I am thrilled, perfectly happy with the 2-1 win, although it wasn’t easy and we were a bit lucky at the end,” said Vrba, who started with seven players from the Czech top flight.
“We scored a beautiful goal that helped us a lot. In the second half we waited, it would have been suicide to play in their half.
“We tried to succeed on the break and reaped the bonus of the winning goal.”
Holland, who won nine and drew one of 10 qualifiers for the World Cup, face Kazakhstan at home and Iceland away in October.