Defending champions Bayern were beaten in only their second German league game of the season and were punished for a lethargic first-half performance.
Thomas Müller wasted a golden chance to put his side ahead when Bastian Schweinsteiger's final pass put him one-on-one with Kaiserslautern goalkeeper Tobias Sippel on 24 minutes, but he fired just wide.
"We played a good game right up until the last pass," said van Gaal. "The first chance of a goal should have been scored by Müller as we were three against one, he should have looked up."
"Kaiserslautern played well and were compact, they played with much passion," he said. "Their first goal was like something you see in Sunday park football."
Having won the second division title last season, Kaiserslautern beat Cologne last weekend and have now claimed Bayern's scalp thanks to goals from Ivo Ilicevic and Srdjan Lakic, who has now scored three in two games.
Bayern were floored by Kaiserslautern scoring their goals in less than two minutes with Ilicevic playing a huge part in both.
The first came when defender Florian Dick got the better of Franck Ribery and knocked in a cross which striker Adam Nemec left for Ilicevic to fire past Bayern goalkeeper Hans-Jörg Butt on 36 minutes.
Seconds later, the Croatian supplied the final pass which split the Munich defence and allowed Lakic to slot past Butt for his third Bundesliga goal in two games after his pair against Cologne.
In injury time, striker Ilicevic was sent off for a second yellow card, but it did little to spoil Kaiserslautern's party.
"We wanted to stand up to Bayern," said Ilicevic. "We implemented the game plan well and deserved to win. We made life difficult for Bayern."
Champions League finalists Bayern were made to look pedestrian at Kaiserslautern's notorious Betzenberg stadium.