Yeovil, who started the four-match Christmas programme seven points behind leaders Scunthorpe, moved three points clear at the top of Coca-Cola Two with their seventh successive victory.
But they were forced to come from behind to beat a spirited Shrewsbury side that had themselves picked up maximum points from their last two games in bid to get out of the relegation zone.
The Shrews packed bodies behind the ball in the first half and although Yeovil had all the attacking play they needed a deflection to put them on the scoresheet.
Darren Way tried his luck from 25 yards and the ball wrong-footed Scott Howie as it skidded of the defender and flew into the net.
Yeovil appeared to be in control in the second half but were shaken out of their complacency when goalkeeper Chris Weale, put in trouble by some careless defending, bought down Kelvin Langmead and Jake Sedgemore equalised from the spot.
In the 74th minute Yeovil conceded a second goal to David Edwards just three minutes after they were reduced to ten men when central defender Colin Miles was sent off for violent conduct.
The Glovers looked in deep trouble but Shrewsbury did not help their cause when substitute Luke Rodgers was sent off in the 76th minute and the hosts mounted a series of ferocious late attacks that brought them three goals.
Paul Terry headed the first of them in the 78th minute and substitute Adrian Caceres made it 3-2 six minutes later.
The clincher came in the last minute when Kevin Gall's speed took him clear of the defence before he fired home.