Comes from NBC's Parks and Recreation. This is a term used to express extreme disappointment, annoyance, frustration, disbelief, dismay, dumbfoundedness, or irritation at yet another dumb thing that Pawnee, Indiana Parka and Recreation Department employee Garry "Jerry" Gergich has done.
This term can be used generically to express the above reaction at any stupid thing that anyone does by replacing the person's real name with "Jerry."
TERRENCE: "Ugh. I just dropped my peanut butter and jelly sandwich on your laptop keyboard. Oops."
PHILLIP: "Dammit Jerry! You're such a Jerry!"
TERRENCE: "Who's Jerry?"
PHILLIP: "You are, idiot."
A term most often used when your friend does something dumb, cooler than something you did, owned something in a game, et cetera. However, it is not just limited to "Dammit Jerry!" Other permutations may exist, or replacing Jerry with another person's name.
Bill: Dude, you know Mia from Biology?
James: Yeah? What about her?
Bill: I hit that.
James: DAMMIT BILL!
- or -
Bill: Holy shit!? Did you just kill that guy with the Spartan laser!?
James: You know it bro!
Bill: DAMMIT JAMES!
- or -
Jerry: Hey Bill, did you get Oblivion Shivering Isles?
Bill: No, why do you have it?
Jerry: Yep! hahaha!
Bill: DAMMIT JERRY!