Other than the Apostles, who was the first person in The New Testament to recognize Jesus as the Messiah?
Mary was informed by Gabriel that her Son would be Son of God, and be given the throne of David; while Joseph was made aware that He would save His people
The first to be made cognisant of the fact that Jesus was specifically Messiah, or Christ, were certain shepherds abiding in the fields outside Bethlehem, keeping watch over their flocks by night. The angel passed a remark to the effect that for them, in the City of David, was born a Saviour which is Christ (Messiah) the Lord. They went to see Him.
Then there were Simeon and Anna in the Temple.
This can be read in Matthew 1 and Luke 1 and 2.
The key to answering this question is the reciprocal relationship between Savior and believers:
Savior: I AM HE
15 The woman said to him, “Sir, give me this water so that I won’t get thirsty and have to keep coming here to draw water.” 16 He told her, “Go, call your husband and come back.” 17 “I have no husband,” she replied. Jesus said to her, “You are right when you say you have no husband. 18 The fact is, you have had five husbands, and the man you now have is not your husband. What you have just said is quite true.” 19 “Sir,” the woman said, “I can see that you are a prophet. 20 Our ancestors worshiped on this mountain, but you Jews claim that the place where we must worship is in Jerusalem.” 21 “Woman,” Jesus replied, “believe me, a time is coming when you will worship the Father neither on this mountain nor in Jerusalem. 22 You Samaritans worship what you do not know; we worship what we do know, for salvation is from the Jews. 23 Yet a time is coming and has now come when the true worshipers will worship the Father in the Spirit and in truth, for they are the kind of worshipers the Father seeks. 24 God is spirit, and his worshipers must worship in the Spirit and in truth.” 25 The woman said, “I know that Messiah (called Christ) is coming. When he comes, he will explain everything to us.” 26 Then Jesus declared, “I, the one speaking to you—I am he.”
Believers: "We know that this man really is the Savior of the world."
39 Many of the Samaritans from that town believed in him because of the woman’s testimony, “He told me everything I ever did.” 40 So when the Samaritans came to him, they urged him to stay with them, and he stayed two days. 41 And because of his words many more became believers. 42 They said to the woman, “We no longer believe just because of what you said; now we have heard for ourselves, and we know that this man really is the Savior of the world.”
Assuming that all Christ's followers "fell away" prior to the resurrection, such that the resurrection was the defining moment of the truth of Christ, I'd suggest that the order of appearance that led to belief in Jesus as Messiah is some of the guards, Mary Magdalene, the women, and the two on the way to Emmaus. Remember that the women were going to anoint the body for burial, even though Joseph of Arimethea and Nicodemus had done so. The apostles were in their homes.
Christ said this.
Mt. 26:31 [prior to arrest] Then saith Jesus unto them, All ye shall be offended because of me this night: for it is written, I will smite the shepherd, and the sheep of the flock shall be scattered abroad.
Zec. 13:7 Awake, O sword, against my shepherd, and against the man that is my fellow, saith the LORD of hosts: smite the shepherd, and the sheep shall be scattered: and I will turn mine hand upon the little ones.
John 20:9 For as yet they [Peter and John] knew not the scripture, that he [Christ] must rise again from the dead.
Until after the resurrection, they didn't believe that Jesus was Messiah. They did believe Mary Magdalene that the tomb was empty, but they didn't know why.
So, after the sheep are scattered, here is the first reaction to the risen Lord.
Mt. 28:4, 11 And for fear of him [risen Lord Jesus] the keepers did shake, and became as dead men. ... Now when they were going, behold, some of the watch came into the city, and shewed unto the chief priests all the things that were done.
Some of the guards went to the chief priests. What of the rest of them? Presumably they had become believers, refusing to notify the authorities for fear of their own safety.
After the guards, the next group would be the women and specifically Mary Magdalene first.
John 20:18 Mary Magdalene came and told the disciples that she had seen the Lord, and that he had spoken these things unto her.
So, the first known person to recognize Jesus as the risen Lord was Mary Magdalene.