Sharma tried to take on the veteran off-spinner but miscued and skied a catch into the outfield to Mitchell Starc, who ran in from long-on and took a sliding catch.
Pujara was on eight not out from 49 deliveries and India's stand-in captain Ajinkya Rahane was on two at the interval as clouds loomed over the Gabba. They didn't return to the field, and play is scheduled to start a half-hour early on Sunday.
The series is tied 1-1 and India need only a draw to retain the Border-Gavaskar trophy. But the inexperienced Indian bowling attack kept the tourists in the contest despite missing pace spearhead Jasprit Bumrah and leading spinner Ravichandran Ashwin.
Australia resumed Saturday at 274—5 and the innings was steadily building in a 98-run partnership between skipper Tim Paine (50) and allrounder Cameron Green (47) until India snared three wickets for four runs in 14 deliveries to reduce the hosts to 315-8.
Thakur got the big breakthrough, when Paine chased an outswinger and was caught at second slip by Sharma. Sundar bowled Green in the next over with an off-break delivery that turned the other way, straightened and beat the edge.
When Thakur trapped Cummins lbw with a full ball hitting around ankle height, the Australians were in danger of an embarrassing batting collapse.
But a 39-run ninth-wicket stand between Lyon and Starc staved that off and helped Australia pass the 350 mark before Sundar struck again close to lunch.
Lyon, whose cameo innings grew in confidence when he pulled Thakur behind square for a boundary and drove the next ball straight down the ground for another four, was dismissed for 24 from 22 deliveries when he attempted a sweep to a straight ball from Sundar that rattled his stumps.
Starc finished unbeaten on 20 when fellow paceman Josh Hazlewood was out for 11.
India's pace attack, led by Mohammed Siraj in his third test, performed admirably despite dealing with yet another injury. Navdeep Saini left the field on Friday with a ball remaining in his eighth over because of a groin strain and wasn't able to bowl on Saturday morning.
Here's how the day unfolded: