Diktat - is a a formal codestyle and a custom ruleset with a much more detection rules than ktlint has in it’s ruleset. We have ~100 configurable rules and a formal codestyle for detecting issues. We have more rules than ktlint, they are much more complex and we have a formal style guide that describes all rules that we are checking and fixing. Also we have a great configuration mechanism that allow you to change and customize your ruleset. ktlint is not configurable. You cannot customize it in the way diktat can. You cannot customize rules that you are using.
And detekt itself is used for different purposes - it is a functional bugs detection system. For code style it uses ktlint, so see the first point :)
Diktat itself - is a static analyzer that uses ktlint for codestyle and codesmell issues under the hood. The idea is simple: you have different tools. One is - a static analyzer that does some searching for bugs (but actually bugs are pretty simple). It is detekt. The second approach - is ktlint - a checker and autofixer. It handles all your problems related to codestyle. And if you are lazy - it can fix them for you automatically :)
Diktat - is a plugin for ktlint. A huge number of rules that can check and fix codestyle issues.