Do I have to repay my boss for wages overpaid for a year by the company's accountant?
You have to repay the money. A mistake does not entitle you to keep money paid you in error. That you may have innocently thought the money was yours is irrelevant: your intentions do not play a role in this. All that matters are that you were overpaid.
It is a common—but unfortunately mistaken—belief that if someone, such as an employer, makes a mistake and overpays you, that as long as you were “innocent” of causing the error, you can keep the extra money. However, that is not the case. If you are overpaid by accident or mistake, you have to return the overpayment, and your role in causing the error, your knowledge (or lack therefore) of the error, your intentions, and even the effect on you of having to repay are all irrelevant.
It is helpful to distinguish between a right to something and possession of it. Having a right to something, like a sum of money, means that title has been transferred to you or that you have an enforceable legal claim to it. For example, when you perform work for an employer, you do so according to a mutual understanding or agreement: you will work X days or Y hours in exchange for Z dollars. That understanding is effectively a contract. If you do the work, you therefore have a contractual right and legal claim for the money due to you.
Possession, however, just means that something was sent to, left with, etc. you, but it does not give you a right to it or transfer ownership of the item or sum of money. Commonplace examples illustrate this: if you borrow $5.00 from a friend and accidentally hand him a $50.00 instead of a $5.00 when you repay him, then realize your error, you’d expect him to return the extra $45.00—and would be legally entitled to it. Or if you had a $400.00 credit card statement and accidentally wrote $4,000.00 on the check, the credit card issuer could not simply keep the extra $3,600.00. They’d have to either return the money to you or least given you a $3,600.00 credit on your card, which would then offset future charges. That’s because accidentally giving someone—e.g. your friend, or the credit card company—extra money does not let them keep your money.
In the context of employment, as mentioned above, you have the right to be paid as per the then-existing agreement between you and your employer. To oversimplify (ignoring taxes and any premiums for benefits), say you earn $52,000 per year, or $1,000 per week. For each week you work, you are entitled to—that is, you have an enforceable legal right to—be paid $1,000. Now, let’s say that for 4 weeks (2 pay periods), you were paid $2,000 per week instead. You were given $8,000, but by the terms under which you work, you are entitled to only $4,000 for that period of time. You have no right to the extra $4,000, and just like your friend would have to return the $45 you overpaid him, or the credit card company credit you for $3,600 of surplus payments, so, too, you do need to return the extra $4,000.
You have no right to the extra $4,000. Having no right to it, if the employer seeks its return, it must give it back. All that matters is how much money you were entitled to, based on the work you did and the agreement (even if only an oral, or unwritten one) as to your wages or salary. Nothing else—not your role in the overpayment, your knowledge of it, your intentions, or your finances—matters.