The research indicates that most people who have absolute pitch have had it from an early age. It seems to be a combination of nature and nurture. Its accuracy and reliability tends to vary over an individual’s life.

It is possible to develop this skill at a later age. We all have ears which are capable of it. For example we can recognise a note as very high or very low without any other note to compare them with, even if the timbre of the sound is identical. Recognising individual notes by name is just a more refined version of this same pitch recognition skill.

Many musicians find they have some degree of absolute pitch already. The A440 tuning note may be familiar, or middle C on a piano. Often guitar players find they recognise the sounds of open strings because they have spent so long hearing those notes while tuning their instrument.

To develop fully-fledged and reliable sense of absolute pitch takes quite a determined effort. You can read about how to go about it in these articles:

Although you can develop absolute pitch, for most musicians it is more effective to spend their time on relative pitch instead. Most musical tasks (e.g. improvisation, playing by ear) can be accomplished with either skill, and relative pitch tends to be more versatile and much more enjoyable to develop.

For example, you can begin putting interval recognition skills to use in improvisation immediately – whereas you must train for absolute pitch for weeks or months before you reliably recognise enough notes to actually put the skill to use in real music.

It can be interesting to develop your ears in this direction, but ultimately you will see vastly better results