You should be aware that you're dipping a toe into a morass of topics in which labels and definitions jostle for position and subjective opinions become loudly attached to (or opposed to) objective (or are they?) studies. For our purposes, let's say that your stated goal is to be able to name a pitch you hear, to within a half-step (not needing to be able to say "that's A 442 Hz", just "A").
Is this a worthwhile goal? I'll say yes. While being able to stand at a piano, hear a single note, and name it is little more than a parlor trick, there are real musical applications that it benefits. If we're asked to transcribe a tune and told that the starting note is G, one person can say "Ok, that's a major 2nd up, a M2 back down, a P4 up, a m2 down..." while another can say "Oh, that's 'G A G C B." If the first person gets one interval wrong every note that follows will be wrong (except usually common sense and tonal context can help them correct), while the second person doesn't have to think about intervals at all (or is free to consider them after-the-fact). And of course, learning a tune "by ear" and being able to play along is simply transcription without the step of writing it down. If I walk into a folk music session and hear someone play through a tune, I hear it involuntarily as a string of named notes (Actually, not primarily—I actually experience it as a sequence of imagined tactile experiences as I imagine playing each pitch and its fingering, but I tie these cognitively to note names).
Is it an urgent or vital goal? I'll say no. Tim's answer shows that there are more practical workarounds you can use while waiting for this skill to develop, like simply watching what's physically being played. If you have "relative pitch" (interval recognition) and can ask the starting note, you can work out the rest. In fact, as long as you can generally distinguish the size of intervals and overall melodic contour ("It goes down a bit then up a lot then down a bit"), and pair that with common sense and the hints of tonal harmony, you can figure out a lot.
I say all that because I'm going to advise that you prioritize some more practical goals before pure pitch recognition, and eventually it will develop through just making music a lot, as well as pursuing more contextualized aural skills. Because that's what you're looking for: there's a whole field called "ear training." Pitch recognition is just one tool in that bag. And meanwhile, there's the notion of "acquired pitch." As a violinist, I can 100% identify a note played on the violin. I can pretty reliably identify a note played on the piano, in violin range. Below violin range I'm much less reliable, and I have a hard time with the human voice or, say, saxophone, because the timbres are too different. I didn't get this ability by working toward it in any way. I got it simply by taking the process of: "See that dot on the page. That's a 2nd finger on A string. Play that." (While some subconscious loop of my brain muttered "... also known as a C.") ... and repeating that times 1,000 of notes per day, hundreds of days per year, over several years. Eventually you internalize the link between the idea of C, the physical/tactile experience of generating it, and the auditory experience of the frequency. I don't mean to take a position on whether absolute pitch can be taught through explicit and intentional work... but I do mean to say: Relax and wait; it will come eventually.
In the meantime, by all means pursue all types of ear training, starting with the foundation. Chances are you already have many of these skills, but in order:
- Can you identify direction in pitch-space? If someone plays two notes, can you say which one is higher or lower?
- Can you get a general sense of distance in pitch space? Given two descending intervals, can you say which is wider?
- Can you master pitch matching? When someone plays a reference tone, can you match it with your voice, whether or not you can name it?
At this point you can build on these skills to go from "that's a fairly wide ascending interval" to "that's a major 7th," and to go from "Sure, I can sing that pitch if you'll keep sustaining it until I manage to match it" to "You can sing several pitches and I can replicate those intervals accurately, using my memory across time." By this point you'll have a working version of "relative pitch," in which you can recreate a tune you hear as a series of intervals, and if you know the starting note, then the distinction between "relative" and "absolute pitch" will start to get awfully blurry anyway.