The starting point is that if you have been overpaid by your employer, then that is not money to which you are legally entitled and it should be repaid.
However, an employee may be able to use the defence of ‘estoppel’ to resist an employer's recovery of an overpayment on grounds of unfairness. For example, in the case of County Council of Avon v Howlett, a teacher was paid more sick pay than he was entitled to. The teacher queried the overpayments but was told they were correct. By the time the Council had realised their mistake, the teacher had spent most of that money. The Court of Appeal held that the defence of estoppel prevented the council from recovering the whole sum of the overpayment.
Case law has evolved somewhat since then, but it has become an acceptable principle that 'estoppel' can apply if the following conditions are met:
So whilst the employer is justified in pursuing the money at this stage, there are ways of defending such a claim. However, that will only potentially be possible if the above conditions are made and if the employee was aware they were being overpaid and did nothing to rectify that, then it is unlikely there will be a defence.
At this stage just see what the employer says and does next - you did state you have a very good relationship with them so if they want you to repay this money, or at least a proportion of it then hopefully you can agree on an adequate repayment plan to suit both parties.