WARNING: There will be spoilers for the final book in this answer, I'm not going to use spoiler tags. If you haven't read the final book and don't want to have elements of the story spoilt then stop reading now.
I think it's a combination of factors.
The first is that he doesn't feel like he can compete with Peeta. Katniss loved them both in her own way and at different times, but despite Gale's history with her, he was never in a position to make the sacrifices that Peeta did. Volunteering to go back into the arena a second time, being willing to die to keep her alive, then being captured and tortured by the Capitol.
Then he says, “I saw Peeta yesterday. Through the glass.”
“What’d you think?” I ask.
“Something selfish,” says Gale.
“That you don’t have to be jealous of him anymore?” My fingers give a yank, and a cloud of feathers floats down around us.
“No. Just the opposite.” Gale pulls a feather out of my hair. “I thought…I’ll never compete with that. No matter how much pain I’m in.” He spins the feather between his thumb and forefinger. “I don’t stand a chance if he doesn’t get better. You’ll never be able to let him go. You’ll always feel wrong about being with me.”
Then there's his potential involvement in Prim's death. Katniss realises that the way Prim died was exactly the way Gale said he'd set up a trap: an initial explosion, wait for rescuers to be lured in, then trigger follow up explosions. Katniss never asks, so she doesn't know for sure, but there's still that fact lingering in her mind. That's going to damage any relationship.
So Katniss chooses Peeta, and that's the final (and possibly most important) reason. Gale loves Katniss, but she's chosen to be with somebody else. Somebody that Gale felt for quite some time he couldn't compete with. Watching somebody you're in love with be with somebody else can be incredibly difficult, so I expect he felt it would be easier for everybody if he was elsewhere and didn't have any contact with her.