Halil Kanacevic added 14 points and 12 rebounds for the Hawks (19-11, 9-6 Atlantic 10), who snapped the Owls' 11-game winning streak.
Rahlir Hollis-Jefferson and Ramone Moore had 15 points for the Owls (22-6, 11-3), who needed a win to clinch the A-10 regular-season title.
St. Joe's took control with a 14-3 run over 5 1/2 minutes late in the second half, with Galloway's two free throws capping it and putting the Hawks ahead 78-65 with 2:36 remaining.
C.J. Aiken put the exclamation point on the victory with a thunderous one-handed dunk with 1:42 remaining.
It was the 154th meeting between the longtime Philadelphia rivals, but just the 10th home game St. Joe's has played on its campus. Normally, the Big 5 contest is played at the Palestra on University of Pennsylvania's campus.
With the victory, the Hawks and Temple share the Big 5 title.