Ulster book last-eight spot
Another triumph next week against Castres will secure a home quarter-final for Mark Anscombe's side.
A first-half try from Nick Williams along with late second-half scores by Jared Payne and Darren Cave secured the four points and with Northampton beating Castres, Ulster progressed after a scrappy game played in difficult conditions at Ravenhill.
Things got even better when Williams turned a ball over in Glasgow's 22 only for the Warriors to clear to touch near their line. The reprieve proved temporary, though, as, from the lineout, which Williams secured, Ulster drove for the line and Williams careered through Robert Hartley to score. Pienaar converted and Ulster were 10-0 to the good.
Then, just before the break, Andrew Trimble's late hit on Henry Pyrgos led to a Duncan Weir shot and the Warriors fly-half was wide. The half ended with Ulster leading 10-0 with Trimble just failing to hold on to an intercept pass right at the end.
The Warriors began the half with Weir finally getting them off the mark after eight minutes after Pienaar was sacked at a ruck. Then matters took a turn for the worse for Ulster when Iain Henderson was yellow carded for not rolling away and the Warriors quickly struck with Weir slotting a second penalty after Ulster were caught offside.
But Ulster dug deep and a drive from Williams and Trimble helped set up Pienaar to make it 13-6 just as Henderson returned.
After putting Glasgow's scrum under huge pressure, Ulster opted to kick their 65th-minute penalty but Pienaar was wide and seven points remained between the sides.
But Ulster then sealed it when Payne crashed over in the 73rd minute after good approach work from Henderson and Pienaar's conversion rebounded out off the post. However, Ulster were not finished and Cave slid over for a third unconverted try with time rapidly running out.