Adam Hammill also missed a chance for the Tykes, but three minutes before the break, the winger made amends with a fine shot into the right corner.
The Latics had the momentum and pushed for a second, but five minutes later, Barnsley regained their lead with Toney in the right place at the right time to head home after Jaaskelainen had initially made the save.
Just after the half-hour mark, Barnsley could have made it three but Hammill curled the ball wide, before Conor Hourihane struck the ball too close to Jaaskelainen as Wigan struggled to stay in the match.
With eight minutes remaining, though, Grigg scored his second of the contest, meeting a cross from Craig Davies to find the net at the near post.
In the penalty shootout, Craig Davies and David Perkins missed the decisive spot kicks for Wigan to allow the visitors to progress.