Gloucestershire likely to face stiff fourth-innings chase after long day in dirt