The UK mains frequency varies during the day according to load and a mains synchronised clock may be out by several seconds at some point during the day because of this.
However, averaged over several days, it should compensate and remain fairly accurate.
You can see an example of the real-time accuracy here:
https://www.dynamicdemand.co.uk/grid.htm
A crystal based clock may only be as accurate as the quality of crystal that you use. Crystal accuracy is measured in ppm (parts per million)
A cheap one may only be rated a 50ppm or worse.
20ppm is about average and 10ppm is quite good.
A 32768khz watch crystal as used with a ds1307 rtc chip usually is 20ppm which gives an accuracy of about +/- 1.7 seconds per day.
Accuracy also varies with temperature and crystal ageing.
Better (more expensive) rtc chips incorporate some means of accuracy adjustment or automatic compensation.(the ds1307 has no adjustment).
Alternative, you could provide some adjustment within your clock.
This may be just a small adjustable capacitor in some designs or a software algorithm in more complex designs.