I've always had great relative pitch but not "perfect pitch"; hearing a note out of the blue without any known context and being able to name it was always a struggle for me, but I did manage to do it first try on this quiz. Different timbres make it easier or harder in my experience. I'm also pretty sure the only reason I can do it now is because with age I got some hearing loss that's not evenly distributed across frequencies so now the difference between different notes is more pronounced.