Gaines scored a game-high 29 points, hitting 9-of-16 shots from the field, and 6-of-9 from long range, while Luis Jacobo scored 13, Joe Edwards 12, and Michael Kibiloski added 10.
Pierre Bland, in his second consecutive start, scored six points while dishing out a career-high nine assists to go with six rebounds in the winning effort.
IPFW (10-13, 3-6 Summit) jumped ahead on the game's first possession on a Kibiloski three-point basket. However, the Jaguars ran off a 9-2 run to push ahead to a 9-5 lead through three minutes of the game.
The Mastodons answered by scoring eight in a row, as the lead changed hands 11 times in the opening 20 minutes. But it was a Mitchell Patton jumper at the buzzer that sent IUPUI into the locker room with a 31-27 lead at the break.
IUPUI (6-18, 1-9 Summit) grew its second half lead to as many as six on an Sean Esposito lay-in out of the locker room, and a Patton lay-in gave the visitors a five-point lead a minute into the half before IPFW ran off a 24-4 run, capped by an Edwards three-pointer, giving the hosts a 15-point cushion with 11:37 to play in the game.
The Jaguars used a stingy press defense, and immediately scored the next nine points over a two minute span to quickly close the gap back to six.
Despite seeing their lead cut, the Mastodons never trailed late in the second half, as a pair of Patton free throws tied the score at 65, before a Mario Hines attempt at the regulation buzzer was blocked, sending the game to an extra period.
In overtime the Mastodons were nearly perfect from the field, hitting 4-of-5 shots, and 5-of-6 free throws. But IUPUI also made 3-of-4 from the field, and an unblemished 8-for-8 at the free throw line.
Kibiloski and Gaines hit three's on back-to-back possessions to give IPFW a four-point cushion, as the hosts never trailed in the extra period until Greg Rice picked off an errant Mastodon pass and streaked down the court for a fastbreak lay-in, giving IUPUI a 79-77 lead.
Edwards was fouled the next time down the floor, and made the first before missing the second attempt. However, the heady sophomore picked up the offensive rebound, and found Gaines in the middle of the lane where he was fouled, and made both of his free throw attempts to give IPFW the lead.
Rice was able to get two-thirds of the way down the court before putting up a running-jumper that went off the backboard to secure the IPFW one-point win.
IPFW hit 51.9 percent of their shots (28-of-54) from the field, and a blistering 12-of-19 (63.2 percent) from long range, while IUPUI was 27-of-43 from the field (62.8 percent), and 20-of-25 from the charity stripe.
The Mastodons outrebounded the Jaguars 27 to 20, while IPFW had a 19 to 10 assist-to-turnover ratio in the contest.
Mitchell Patton scored 25 points for IUPUI, while Donovan Gibbs scored 17, Rice 16, and Esposito 10.
The Mastodons will travel to Omaha on Thursday at 8 p.m.