Everyone is entitled to a private life and having a relationship with a colleague should not be a sacking offence. Your employer should also have followed a proper disciplinary procedure, giving you a right to appeal.
It is unlawful for employers to treat women or men less favourably because of their gender. If only one of you is being asked to leave because of the affair, you may also have grounds for a discrimination claim, regardless of how long you have worked for your employer. This might be the case, for example, if the woman is the younger and more junior of the couple and is asked to change departments, or even to leave her job altogether, whereas the more senior man is not.
It is also unlawful to treat someone less favourably because of their sexual orientation, for example treating one or both members of a same-sex couple negatively because they have started a relationship at work, when a heterosexual couple would have been treated differently.
Depending on the circumstances, the employer may also be guilty of harassment.
Some employers have specific policies in place that try to regulate workplace relationships. Get a copy of any policy.
Make sure to talk to your workplace union rep if you have one, and seek union or other legal advice as soon as possible. Employment tribunal deadlines are very short.