Basically,
みたいです is your assumption/judgement. It may be from your feeling, observation, what you heard, or information you got. Also, みたいです is used only in non-formal speech, not in writing and formal speech. (Formal equivalent is ようです)
そうだ is your instant impression from what you see, hear, smell, touch, or taste. It's less logical than みたいです.
In some situations, both may be possible.
Example)
You are talking about flu shot with your friend. You have heard some people say it' s very painful, and that rumor made you assume so.
Then you'd say 「痛いみたいです。」
You are watching someone take a flu shot. His facial expression tells how painful the shot it. Then you'd say 「痛そうです」.
Grammar note:
There are other usages of そうです.
One of them is hearsay (from confirmed sourse). But in this case, you put そうですafter a complete sentence with verb, adj, or noun+copula, whereas you need to conjugate the adj for そうです as impression.
痛いそうです(They say it is painful.)
痛くないそうです。(They say it's not painful.)
痛そうです。(It looks painful)
痛くなさそうです。(It looks unpainful.)