Pivac will replace Gatland in charge of the Six Nations Grand Slam champions following this year's Rugby World Cup in Japan.
But Gatland, who has led Wales for 12 years, will soon return to Cardiff as the Baa-Baas coach, adding an intriguing narrative to Pivac's debut match.
Pivac said: "The Barbarians are a special side and it will be a great way to start my Wales career facing the Baa-Baas and, of course, Warren.
"Wales have an important five months ahead of them with the Rugby World Cup on the horizon but, post that tournament, I'm looking forward to kicking off my tenure with Wales, at home in Cardiff, in what will be a really special game."
We’re heading to Wales
It’s a DOUBLE HEADER as our Men & Women take on @WelshRugbyunion
With Warren Gatland as our coach
— Barbarian FC (@Barbarian_FC) June 5, 2019
The fixture will be part of a double-header with the respective women's teams also facing off.
The Barbarians lost 51-43 to an England XI in Sunday's Quilter Cup clash at Twickenham.
Photo Getty Images. Caption: Soon-to-depart coach, Warren Gatland