Ulreich – making his comeback from an adductor problem – kept out Chadrac Akolo's spot kick after the video assistant referee had spotted a foul by substitute Niklas Sule on Santiago Ascacibar in a frantic finish at the Mercedes-Benz Arena.
The late miss meant a 79th-minute strike from Thomas Muller – who, like Sule, was sent on in the second half – settled the game after Bayern had struggled to find a way past home goalkeeper Ron-Robert Zieler.
Zieler produced a string of eye-catching saves as Bayern looked in danger of failing to find the net for the first time in all competitions since a 2-0 league defeat to Hoffenheim way back on September 9.
However, super-sub Muller - as inspirational introduction with 25 minutes remaining - secured the reigning champions a fifth straight win in December and extend their advantage at the Bundesliga summit.
With nearest rivals Schalke only able to draw at Eintracht Frankfurt, plus RB Leipzig not in action until Sunday, Jupp Heynckes' runaway leaders now sit 11 points clear after their final match before the mid-season break in Germany.
Ulreich – who came through the Stuttgart ranks before moving on in 2015 – proved to be the late hero, yet it was opposite number Zieler who was, unsurprisingly, the busier of the two goalkeepers in a battle between clubs at opposite ends of the table.
The Germany international, who won the last of his six caps back in 2015, showed sharp reactions to keep out the in-form Robert Lewandowki's curling effort from the left side of the area in the 21st minute.
Zieler also came to Stuttgart's rescue when Corentin Tolisso raced clear 10 minutes before the break, stretching out his right foot to keep out the Frenchman's low attempt.
Having posed a threat going forward in the first half, the home side struggled to retain possession after the break as Bayern turned the screw, patiently probing with their passing in search of a breakthrough.
Both Kingsley Coman and Jerome Boateng, who went for precision and power respectively, saw long-range attempts spectacularly turned away by Zieler, as the away team's frustrations forced them to try their luck from distance.
Mats Hummels' hopes of marking his 29th birthday with a goal disappeared when he was replaced by Sule, though it was another replacement in Muller who finally found a way beyond Stuttgart's last line of defence.
Picked out by Coman's pass inside the area, the forward controlled the ball with his right foot before quickly firing home with his left, ending Zieler's hopes of keeping a clean sheet as the ball squeezed inside the near post.
James Rodriguez failed to convert a one-on-one-opportunity before late drama unfolded in added time. Sule's careless hack was rightly punished by the VAR official, yet Ulriech guessed correctly to keep out Akolo's kick and secure Bayern a third straight 1-0 triumph.