A self-converted try and five penalties, the last of which came in the final seconds, were enough to see off the Warriors, whose sole try came from Ryan Grant.
Scotland fly-half Ruaridh Jackson booted 11 points, while his replacement Duncan Weir set up a tight finish with his late penalty.
Jackson slotted the game’s opening points but parity was restored in the 12th minute when Ulster fly-half Pienaar slotted a 40-metre penalty resulting from a front-row infringement in the scrum. Moments earlier, he had failed with a more challenging attempt from the touchline.
Referee David Jones detected yet another offence in the front row of the home scrum, presenting Pienaar with a simple penalty chance which he stroked over.
The half closed with Pienaar thumping over a monster penalty from inside his own half to stretch the Ulster advantage to six points.
Two early Jackson penalty misses dented his side’s aspirations after the break but on 48 minutes, Jones awarded a scrum penalty in favour of the home side, and this time Jackson made no mistake from straight in front.
The Ulster men’s creaking defence was eventually breached when towering lock Ally Muldowney crashed through a lineout to charge down scrum-half Paul Marshall’s kick. Muldowney showed great awareness to scoop the loose ball back to the onrushing substitute Ryan Grant, who powered over from close range. Jackson added the extras.
Straight from the restart, further indiscipline handed Pienaar an opportunity to restore his side’s lead, but his penalty attempt drifted wide.
Returning Ireland hooker Rory Best entered the fray with 20 minutes to play, but his stay was short-lived as only minutes later he was ordered to the sin bin for an indiscretion at a ruck. Jackson added to his side’s lead with the resulting penalty.
Pienaar atoned for his earlier misses with the boot in style with the game entering the final 10 minutes, scrambling over for a self-converted try, which needed confirmation from the video referee, to level the scores.
Pienaar appeared to have secured the victory with a sweetly-struck penalty from halfway but Weir knocked over a long-range effort to set up a tense finale. And it was left to Pienaar to have the final say, after backchat among the Glasgow ranks moved a long-range penalty into the South African’s kicking range and he duly converted.
GLASGOW: B Stortoni; DTH van der Merwe, F Aramburu, P Murchie, A Dunbar; R Jackson, C Gregor (c); J Welsh, F Thomson, M Low; A Muldowney, R Harley; J Eddie, R Wilson, R Vernon.
Replacements: H O’Hare for van der Merwe (54), D Weir for Jackson (75), K Tkachuk for Welsh (56), P MacArthur for Thomson (56), R Grant for Low (56), J Beattie for Eddie (56).
ULSTER: S Danielli; C Gaston, N Spence, P Wallace, C Gilroy; R Pienaar, P Marshall; T Court, A Kyriacou, D Fitzpatrick, J Muller (cpt), D Tuohy, R Diack, C Henry, P Wannenburg.
Replacements: T Seymore for Gaston (70), I Whitten for P Marshall (65), R Best for Kyriacou (50), P McAllister for Fitzpatrick (47), T Barker for Tuohy (66), W Faloon for Henry (61).
Referee: David Jones (Wales).