It's hard to know for certain, but there are very good reasons to believe all four gospels were written in Greek. However, according to the earliest Christian tradition, Matthew was written in Hebrew.
Papias, an early second century bishop and a disciple of the Apostle John, is our earliest witness to the tradition that Matthew was the author of this gospel.
Matthew put together the oracles [of the Lord] in the Hebrew language, and each one interpreted them as best he could.
Irenaeus, writing in the late second century, elaborated on this.
Matthew also issued a written Gospel among the Hebrews in their own dialect, while Peter and Paul were preaching at Rome, and laying the foundations of the Church.
All four gospels were originally published anonymously, and it is only through the testimony of these two second century bishops that we attribute this gospel to Matthew. If we take their testimony at face value, then we might say the Gospel of Matthew was originally written in Hebrew.
Parallels between Matthew and Mark
However, the Gospel of Matthew in its current form—that is, the one that appears in every copy of the New Testament going back to the oldest surviving copies—was almost certainly written in Greek.
As Dick Harfield mentions in his answer, we find close parallels between Matthew and Mark in several places. In this example from the Transfiguration (Matthew 17:1-8 || Mark 9:2-8) I have bolded exact parallels and italicized words and expressions that the later writer has modified.
Six days later, Jesus took with him Peter and James and his brother John and led them up a high mountain, by themselves. And he was transfigured before them, and his face shone like the sun, and his clothes became dazzling white. Suddenly there appeared to them Moses and Elijah, talking with him. Then Peter said to Jesus, "Lord, it is good for us to be here; if you wish, I will make three dwellings here, one for you, one for Moses, and one for Elijah." While he was still speaking, suddenly a bright cloud overshadowed them, and from the cloud a voice said, "This is my Son, the Beloved; with him I am well pleased; listen to him!" When the disciples heard this, they fell to the ground and were overcome by fear. But Jesus came and touched them, saying, "Get up and do not be afraid." And when they looked up, they saw no one except Jesus himself alone.
Six days later, Jesus took with him Peter and James and John, and led them up a high mountain apart, by themselves. And he was transfigured before them, and his clothes became dazzling white, such as no one on earth could bleach them. And there appeared to them Elijah with Moses, who were talking with Jesus. Then Peter said to Jesus, "Rabbi, it is good for us to be here; let us make three dwellings, one for you, one for Moses, and one for Elijah." He did not know what to say, for they were terrified. Then a cloud overshadowed them, and from the cloud there came a voice, "This is my Son, the Beloved; listen to him!" Suddenly when they looked around, they saw no one with them any more, but only Jesus.
Although these are not exact copies of each other, the presence of so many exact phrases is a strong indication that one author used the other as a source. There are good reasons to believe that Matthew used Mark as a source, and not the other way around.
Differences between Matthew and Mark
First, there are a number of passages where Matthew elaborates on what is written in Mark. For example, compare their accounts of Jesus' temptation in the wilderness.
And the Spirit immediately drove him out into the wilderness. He was in the wilderness forty days, tempted by Satan; and he was with the wild beasts; and the angels waited on him.
Then Jesus was led up by the Spirit into the wilderness to be tempted by the devil. He fasted forty days and forty nights, and afterwards he was famished. The tempter came and said to him, "If you are the Son of God, command these stones to become loaves of bread." But he answered, "It is written, "One does not live by bread alone, but by every word that comes from the mouth of God.' " Then the devil took him to the holy city and placed him on the pinnacle of the temple, saying to him, "If you are the Son of God, throw yourself down; for it is written, "He will command his angels concerning you,' and "On their hands they will bear you up, so that you will not dash your foot against a stone.' " Jesus said to him, "Again it is written, "Do not put the Lord your God to the test.' " Again, the devil took him to a very high mountain and showed him all the kingdoms of the world and their splendor; and he said to him, "All these I will give you, if you will fall down and worship me." Jesus said to him, "Away with you, Satan! for it is written, "Worship the Lord your God, and serve only him.' " Then the devil left him, and suddenly angels came and waited on him.
It is hard to see why Mark might have left out these details if he had them available, but it is easy to see why Matthew might have added them if he had them available.
In some places, Mark displays an apparent lack of geographical knowledge. In Mark 5:1 Jesus is said to have crossed the sea of Galilee to "the country of the Gerasenes". The parallel in Matthew 8:28 says "the country of the Gadarenes". Gadara (modern Umm Qais) is located by the sea of Galilee, while Gerasa (modern Jerash) is more than 30 miles away.
Following the feeding of the four thousand, Mark 8:10 states that Jesus got in his boat and went to a place called Dalmanutha. This name is not mentioned anywhere else in ancient writings, and no town by that name has ever been uncovered. Matthew 15:39 says Jesus went to Magadan (or Magdala in some manuscripts).
It's hard to imagine why Mark would choose the words "Gerasenes" and "Dalmanutha" if he had a copy of Matthew's gospel in front of him, but it's easy to see why Matthew would have chosn "Gadarenes" and "Madagan" if he had a copy of Mark along with additional knowledge.
So how do we reconcile the evidence that Matthew used the Greek Gospel of Mark as a source with the tradition that the Gospel of Matthew was written in Hebrew or Aramaic?
One possible explanation is that Papias and Irenaeus are referring to an early gospel written by Mathew in Hebrew, and that the book we know as the Gospel of Matthew drew upon this (or a translation of it) to supplement the information he got from Mark. Since we have no surviving Hebrew manuscript, it's hard to say how likely this is. But in either case, the gospel that made it into the Bible with Matthew's name was composed in Greek.