How awful...!
First, I would write to the German university explaining your situation and asking whether they would consider reinstating your offer.
Second, I would contact someone senior at the UK medical school (the Director of Admissions, Dean, or both...) with an extremely polite email (get someone to check it...!!) that explains how delighted you were to receive an offer from their institution as it was your first choice... and that this mistake has caused you to decline a place at another medical school (attach evidence)... explain that you are on their waiting list and so presumably satisfy the criteria for admission... then ask whether they would be willing to prioritise your position on the waiting list under these particular circumstances. I would hope that they would find a way to ensure that you were awarded the next available place that comes up at their institution. You need to sound polite and disappointed but make it clear that this mistake might have derailed your medical career.
In terms of UK law, there is no contract unless there is both offer and acceptance. An offer (e.g. of a medical school place) can be withdrawn at any stage up until it is accepted. If they wrote "we offer you a place" and you replied "that's great - I accept your offer" (or something similar) then they are in a very difficult position indeed and might have to honour their mistake.
If this isn't the case, and they don't give you a place, you*could potentially sue them for negligence. If you did this, they wouldn't have to give you a medical school place but would have to compensate you for any losses as a result of their negligent email, e.g. payment for a lost year of earnings if you don't get in somewhere else this year and have to apply again. I would not make any threats at this stage... play nicely (but firmly) and you might find that things work out for the best. Make sure you are talking to someone senior and not a secretary/administrator.*