As far as I remember, Pamela Adlon plays the Louie characters friend and eventual girlfriend. The whole thing is played as if he's the most pathetic guy on earth for how he continues to pursue her despite her being very hesistant about it and generally making fun of him. I think this scene happens just before they become a couple but I can't really remember. Basically he's trying to get her to have sex with him and she is grossed out and tries to leave and then he does things like in the gif. It's basically what it looks like.
Louie isn't a really a comedy show. It was a mix of comedy, drama and just total depression, so in context of the show at the time this came off differently than people use the gif now. I didn't think this was supposed to be representative of normal behaviour or a sweet romance and I still don't. However, Louis CK obviously has the kind of material he likes to dwell on and since hints of what he's done are in so much of his work, his work is now largely poisoned.
I'm not one of the people who thinks using fictional stuff is good material to judge a person by, actually I think that's really stupid in most cases, but I guess looking back on this now, it'd be pretty hard to watch considering it isn't miles away from what he has done in real life before this was made. Then again, I'll probably never look at anything Louis CK does again anyway, so it's pretty irrelevant.