Media playback is not supported on this device
Van Persie scored two goals along with Arjen Robben, while Stefan de Vrij also netted as Spain were humiliated at Arena Fonte Nova in Salvador.
Media playback is not supported on this device
But Van Persie attributed the emphatic win to the tactics of Van Gaal, his new manager at Manchester United.
"This is definitely down to him," said the 30-year-old.
Spain, who are also the European champions, were humiliated as the Netherlands came from behind to thrash their opponents.
Van Persie cancelled out Xabi Alonso's penalty with a sublime header before goals by Bayern Munich's Robben and Feyenoord defender De Vrij made it 3-1.
Two goals in the space of eight minutes by Van Persie and Robben completed Spain's embarrassment.
"If you see how he prepared us, and how he predicted the game would go, and you see how it went - unbelievable," added Van Persie about Van Gaal.
"For the whole Netherlands, this is a dream come true.''
Van Gaal, who will take over at Old Trafford after the tournament, was delighted with his team's win.
"The Netherlands were sensational.  It should have been seven or eight. Some of the performances - Arjen Robben, Robin van Persie and Daley Blind down that wing, they were absolutely brilliant. I have never seen that Spain back four pulled around as much as they were."
The 62-year-old returned Van Persie's compliment, praising the striker along with the rest of the side.
"With strikers like Van Persie, Robben and Wesley Sneijder behind them, things like this can happen,'' he said.
Van Gaal's side face Australia next on 18 June in Porto Alegre and the former Barcelona boss urged caution despite getting their campaign off to a flying start.
"We don't have anything yet," he added. "We've made a pretty start. If you beat Australia [on Wednesday], then you've made a good start.''
Spain's experienced goalkeeper Iker Casillas says he was responsible for the reigning champions' disastrous defeat.
"I wasn't at the level I needed to be. I have to accept all criticism.
"I didn't do things like I should have, especially to start a World Cup," said Casillas, who was dispossessed by Van Persie for the fourth goal.
Robin van Persie praised Netherlands boss Louis van Gaal for masterminding the team's crushing 5-1 win over reigning world champions Spain.