Aha! I just found another newspaper report for 1861 that confirms that at that time Barnsley Grammar School was indeed on Church Street, the master being a Mr Hargreaves. Since my interest is the 1860s, it seems likely that the Cooper Gallery was formerly the grammar school when my ancestor and his brothers attended.