Great dialogue is not realistic dialogue. Great dialogue is better. We all know that realistic dialogue is boring. People just aren’t that clever on the spot (especially when saying “Hello” and normal pleasantries). So don’t write that stuff. Skip it. Nobody wants to read it.
Great dialogue seems real though it probably isn’t actually realistic. Consider the “what I should have said, was _______” moments in your own life. What you actually said was okay, but later on, you realized the perfect comeback or response—and that’s what your dialogue should be: the best version of what your characters could say.
I’m not suggesting that every bit of dialogue be a zinger or end with an exclamation point. Each scene needs highs and lows. If every statement has a “this is life or death” tone, then none of them will actually carry that tone.
Listening to real people talk is good because it will help you pick up on different speech styles and rhythms, but don’t mimic it exactly. Make it better (more witty, more subtle or dramatic, etc.). Like everything else, this comes with practice. Have fun!
NOTE: Some authors are better than others. I’m a big fan of Nick Hornby’s dialogue. If you’ve never read A Long Way Down or High Fidelity—do yourself a favor and pick one up.