Opener Tanmay Srivastava was unbeaten on 69 off 130 balls, while giving him company was Mukul Dagar on 17. Tanmay struck 12 boundaries during his unconquered knock so far.
Akash Verma (12) was the lone UP wicket to fall, caught by Deepak Hooda off Yusuf Pathan's (1/23) bowling.
UP has a log way to go in the match as they still trail Baroda by 395 runs with nine wickets in hand and two full days play remaining.
Irfan and Swapnil shared 139 runs for the eighth wicket to help Baroda pile up the big score.
More From This Section
But once Irfan departed two runs short of a century, Baroda innings fell apart as Swapnil ran out of partners, but nonetheless, the duo did enough to challenge the hosts' batting line-up.
For UP, left-arm orthodox bowler Ali Murtaza picked up four wickets for 103 runs, while leg-spinner Piyush Chawla scalped three for 159 runs.
Baroda 1st innings: 498 all out in 142 overs ( Kedar Devdhar 146, Irfan Pathan 98, Swapnil Singh 73 not out; Ali Murtaza 4/103, Piyush Chawla 3/159).
Uttar Pradesh 1st innings: 103 for one in 40 overs (Tanmay Srivastava 69 not out, Mukul Dagar 17 not out; Yusuf Pathan 1/23).