It would be a priority, but certainly not number one. Always follow the ABC's. If her airway is occluded, she isn't breathing, or her heart isn't beating, it's going to kill her a whole lot faster than pain will.
That's a good measure to follow when prioritizing- "Which of these is likely to do the most damage/kill the person the fastest?" Address those first.
I don't know her diagnosis, so if she doesn't have any ABC issues, then follow Maslow's Heirarchy of needs. Pain is one of the first you would address next, along with fluid balance (in my opinion ahead of pain) and nutrition (behind pain). Just because your patient is an infant and cannot verbalize her pain does not mean she isn't experiencing pain. Look up the FLACC scale for measuring pain in an infant.