I imagine that just comes from having a good eye.

As for how to get a good eye? Templates. Use less of them. The less you use templates to judge sizes, the more you have to judge them yourself, and eventually, the better you'll be at it. Practice makes perfect, etc etc.