I have a template class, that is simply:
//other properties not related to this problem not shown
CSS has a very well-defined order of priority.
If two selectors have the same priority (as per your two single-class selectors), then with all else being equal, the one which is defined last in the CSS code is the one that takes priority.
So the simple solution here is to move your template CSS to lower down your CSS code.
If you can't do that for whatever reason, your best option is to make the template selector more specific. For example, if all your template elements are contained inside a div element and you know that's always going to be true, you could change the selector to
div .template. It is now more specific than the
.Category selector, and should therefore take precedence.
Finally, you always have the option of
!important. I try to avoid using it if possible, as it tends cause issues if overused, but it is there for cases where it's needed, and in fact, cases like this are about the best justified use-case for
!important I can think of.