Stuttgart now have six points in Group G will now have to defeat Romanian side Unirea Urziceni to advance to the knockout stage.
Sebastian Rudy fired the Germans into a first-half lead before Kris Boyd, in his first Champions League start, missed a golden chance to head the hosts level.
Zdravko Kuzmanovic's header in the second period condemned Rangers to a third consecutive home defeat in the competition after 4-1 thrashings at the hands of both Sevilla and Unirea Urziceni in their previous run-outs.
The result, combined with Unirea's surprise win against Sevilla, leaves Rangers isolated at the bottom of Group G on just two points from five games.
Rangers manager Walter Smith conceded that his side's woeful home record had cost them dearly - they lost all three matches.
"That has been our biggest problem over the three home matches we've had considering the fact we've taken points and looked comfortable away," Smith said.
"We have never looked that way at home."
His Stuttgart counterpart Markus Babbel was delighted after his side won for the first time in 11 matches.
"Defensively and offensively we were very good," Babbel said. "The only little hitch was that we maybe could have scored more."
He had sprung a surprise before kick-off when he dropped captain Thomas Hitzlsperger to the bench whilst Smith named a virtually unchanged side from the one which defeated Kilmarnock at the weekend with Kyle Lafferty replacing Steven Naismith due to injury.
Smith set his side up with three at the back and the Rangers players looked uncomfortable as they tried to get used to their new formation.
Brazilian-born German international Cacau was the first to test Allan McGregor with a fierce shot from 20 yards which the keeper did well to turn round for a corner.
The Germans were dominating possession and took the lead in the 16th minute through Rudy. Alexander Hleb got to the by-line and Pavel Pogrebnyak's miscued effort from his cut-back fell kindly for Rudy at the back post to slot it low past McGregor.
Things could have been worse for Rangers two minutes later when Kuzmanovic thought he had scored direct from a free-kick which evaded everyone in the box but the linesman had flagged Matthieu Delpierre offside.
Rangers, who had reverted to a back four, started to get a foothold in the final 15 minutes. Boyd had their first shot after 32 minutes when he spun on the edge of the box and sent in a low drive which Jens Lehmann watched go by his post.
Boyd then missed a golden chance to level things in the 37th minute. Miller cut out a Stuttgart break on the right and swung over an early cross to the penalty spot where Boyd, normally lethal from that range, headed harmlessly over the bar.
Rangers threw men forward in the second-half as they chased an equaliser and Stuttgart exploited this to double their lead in the 59th minute.
Lehmann cleared a Rangers attack to Rudy and his cross found Kuzmanovic at the back post who had the simple task of nodding home.