the categories from the frontmatter are a list of strings (your categories). If you just insert the list as it is in the class attribute
<article class="post {{ .Params.categories }}">
Go will use its standard formatting with the brackets. But Hugo provides a delimit template function that takes the strings from the list separates each with a delimiter. In your case a whitespace: