According to Uther, magic is outlawed completely.
- If you can do magic, and are discovered, you are put to death.
- If you do magic, and are discovered, you are put to death.
- If you are magic, and are discovered, you are put to death.
Basically if there is anything magical about you, and you're found out, you're dead - no matter who you are, how old you are, or your intentions.
In Mordred's case, he was a child of the druids, and they're just dripping with magic according to Uther, and therefore a threat.
Gaius is a special case; I don't think Uther realizes that Gaius can do magic, but he does know that Gaius has ties to the magical community. I think he just assumes that Gaius will go seek out the black market magic in town when he says that he wants Gauis to use 'any means necessary' to cure Morgana. (I seem to recall that there's another case where he gives Gaius this imperative; perhaps when Arthur was dying? Everyone very nearly dies in this show so many times!) Plus, he has absolute faith in Gaius' loyalty, which allows him to overlook any magical leanings. Not to mention that whole using magic to have a son thing. His hypocrisy is just limitless...