Yusuf (6/67) exploits with the ball enabled Baroda to bundle out UP for 223 in 88.1 overs in their first innings and enforce follow-on on the hosts.
At stumps, UP were 122 for three in their second innings while following on and still need to score 153 runs to avoid an innings defeat.
Umang Sharma was unbeaten 57, while giving him company was Arish Alam on 15.
Earlier resuming their first innings at the overnight score of 103 for one in reply to Baroda's huge 498, UP lost wickets at regular intervals to invite trouble for themselves.
Also Read
Tanmay Srivastava, who was unbeatn on 69 overnight, made a well-deserved 112 off 223 balls with the help of 14 boundaries, but barring him none other UP batsmen could hold their fort.
Besides Yusuf, his brother Irfan Pathan (2/39) and Bhargav Bhatt (2) were the other wicket-takers in UP's first essay.
It will now take a Herculean effort from the UP batsmen to save the match as Baroda has an entire day to wrap up the hosts innings and pocket an outright win.
Baroda: 498 all out in 142 overs.
UP: 223 & 122 for three in 30 overs (Umang Sharma 57 not out; Swapnil Singh 2/31).