It litterally means "I had sex with your grandmother last night."
It just removes the word 'sex' to make it shorter, like any other slang term.
Ryan: "Yo man, what were you doin' last night?"

Jack: "I had yer grandma last night"

Ryan: "What the hell man?! That's sick!"
by jeNANANANANAA BATMAN! April 11, 2009
Get the I had yer grandma last night mug.