Swapnil walked in with Baroda at 100 for 6, with their lead a mere 61 at that stage, and built fighting stands with the lower order before he was last out for 83 at the team total of 245.
Chasing 207, Tamil Nadu lost Abhinav Mukund after an opening stand of 38, and were 51 for 1 at the draw of stumps at the Moti Bagh Stadium.
Tamil Nadu require another 156 runs to win tomorrow with nine second innings wickets in hand.
Earlier, Tamil Nadu's seam attack began the day with a flurry of wickets, removing three Baroda batsmen for the addition of 27 runs to their overnight 73 for 3.
Swapnil added 58 with captain Aditya Waghmode for the seventh wicket, 30 with Gagandeep Singh for the ninth wicket and 46 with Sagar Mangalorkar for the final wicket before he became L Balaji's third victim. Swapnil's 178-ball innings contained 10 fours and a six.