How to change granularity level of undo in emacs evil-mode with undo-tree?

Try evil-want-fine-undo:

Whether actions are undone in several steps. There are two possible choices: nil ("no") means that all changes made during insert state, including a possible delete after a change operation, are collected in a single undo step. Non-nil ("yes") means that undo steps are determined according to Emacs heuristics, and no attempt is made to aggregate changes.

(setq evil-want-fine-undo t)

Is this specific to undo tree? I don't use it, so the following might not apply...

I'm not sure if you can modify the amount of editing that the undo mechanism considers to be a single unit, but what you can do is:

Select a region first and then type the undo key, and Emacs will only undo changes that were made in that region.

That can be very useful.