Azhar Ali and Steve Davies also weighed in with half-centuries and shared in stands of 94 and 70 with Hildreth for the second and fifth wickets respectively as the hosts reached the close on 243 for five still 137 runs behind.
Rikki Clarke had earlier scored an unbeaten 59 to help Surrey achieve 380 in their first innings and then claimed the key wicket of Hildreth in the final session to give the defending champions a potentially crucial advantage at the halfway stage.
Much will depend on Davies when he resumes his innings on 54 not out on a pitch which is expected to offer increasing assistance to spin during the next two days.
Azhar and Hildreth will regret not converting useful totals into something altogether more substantial, both surrendering their wickets in meek fashion after surviving trial by pace bowling at the hands of Morne Morkel and Conor McKerr.
Especially strong off the back foot, Azhar fought fire with fire in raising a 49-ball 50 with nine fours.
When it looked as though he might go on and attain three figures, he inexplicably succumbed to Gareth Batty's off-breaks, tamely chipping to mid-wicket and departing for 60.
Hildreth's rather more studious innings was a high-class affair and, having attained 50 from 80 balls, he was supremely well-placed to register the 46th first-class hundred of his career, only to suffer a loss of concentration and offer a return catch to Clarke via a leading edge.
Aware of his responsibilities, Davies continued to show defiance, going to 50 from 91 balls and sharing in an unbroken partnership of 32 for the sixth wicket with Lewis Gregory, who reached the close on 18 not out.
McKerr proved the pick of the Surrey bowlers, removing Marcus Trescothick and George Bartlett, while Morkel had to be satisfied with the wicket of Tom Abell, scant reward for an imposing display of sustained hostility.
A perennial problem for Somerset, Clarke had earlier afforded Surrey's first innings renewed impetus when the visitors resumed on 330 for six.
Quite prepared to play his shots, the veteran all-rounder dominated a stand of 55 with Ryan Patel for the seventh wicket, ushering his side to a fourth batting bonus point.
He went to a 90-ball half-century in fine style, handsomely driving Tim Groenewald to the cover boundary for his ninth four, only to be left high and dry on 59 not out as wickets fell at the other end.
England slow left armer Jack Leach served to keep the champions in check, claiming three wickets in seven overs after being introduced from the River End.
Spearheading a concerted Somerset fightback, he comprehensively bowled Patel for 32, pinned Batty lbw without scoring and sent back last man McKerr, who top-edged a catch to backward point.