I can pretty much tune a guitar to concert pitch without a tuner but my son truly has perfect pitch.I think it is something that you are born with but can be honed. In my case, I think I have somehow memorised the sound of an E and an A. I noticed, years ago, that I could recall a song in my head that I might not have heard for ages and my memorised version was pretty much exactly in tune with the actual version, so I just think of The Beatles "Norwegian Wood" for E and either "Get Back" or "Ticket to Ride" for A and so on. I am not infallible though but by and large my method works for me.