EXCLUSIVE

Justin Bieber is wise enough to know when a gift needs givin' ... but he didn't have a box -- so he covered his junk with a guitar and jammed out a naked serenade for one lucky lady fan -- HIS GRANDMA!

TMZ has obtained photos of a completely nude Biebs strumming away on his big wooden instrument ... at his grandmother's home in Toronto during Thanksgiving back in November 2012.

And why, you ask, did Bieber go ass naked for g-ma?

Our sources tell us JB had been staying at his granny's house during the holiday ... and slept in a little too late on Thanksgiving morning.

Bieber finally woke up after hearing family and friends stirring around the house -- so he thought he'd prank 'em ... by grabbing his guitar and playing a naked set a la Jenny from "Forrest Gump" ('memba that?).

We're told birthday-suited Bieber went right up to his grandma and started belting out some impromptu lyrics ... like, "I Loooove you grandmaaaa ... how are youuuu ... helloooo grandma."

We're told G thought it was pretty funny -- and everyone in the home was cracking up -- but granny begged the pop star to get back in his room to put some damn clothes on, stat.