The Parable of the Workers is found in Matthew 20:1-16
1"For the kingdom of heaven is like a landowner who went out early in the morning to hire men to work in his vineyard. 2He agreed to pay them a denarius for the day and sent them into his vineyard.
3"About the third hour he went out and saw others standing in the marketplace doing nothing. 4He told them, 'You also go and work in my vineyard, and I will pay you whatever is right.' 5So they went.
"He went out again about the sixth hour and the ninth hour and did the same thing. 6About the eleventh hour he went out and found still others standing around. He asked them, 'Why have you been standing here all day long doing nothing?'
7" 'Because no one has hired us,' they answered. "He said to them, 'You also go and work in my vineyard.'
8"When evening came, the owner of the vineyard said to his foreman, 'Call the workers and pay them their wages, beginning with the last ones hired and going on to the first.'
9"The workers who were hired about the eleventh hour came and each received a denarius. 10So when those came who were hired first, they expected to receive more. But each one of them also received a denarius. 11When they received it, they began to grumble against the landowner. 12'These men who were hired last worked only one hour,' they said, 'and you have made them equal to us who have borne the burden of the work and the heat of the day.'
13"But he answered one of them, 'Friend, I am not being unfair to you. Didn't you agree to work for a denarius? 14Take your pay and go. I want to give the man who was hired last the same as I gave you. 15Don't I have the right to do what I want with my own money? Or are you envious because I am generous?'
16"So the last will be first, and the first will be last."
If one looks back to 19:27-30 one sees the context this parable falls in. Jesus had just spoken to the rich young ruler and elaborated that it was difficult for a rich man to enter the kingdom of heaven. Popular theology of the day would have been shocked by this as a wealthy person who kept the commandments, such as this ruler, would have been seen as a person God had blessed for his piety.
It is in this context that Peter makes his comments in verses 19:27-30
27Peter answered him, "We have left everything to follow you! What then will there be for us?"The rich young ruler had been asked to give everything up and follow Christ. He was unable to do this. Peter stepped in and drew a contrast between the rich young ruler and himself. He and the other apostles, had left everything to follow Christ. Surely, then, they, in contrast to the young ruler, will inherit some reward?
28Jesus said to them, "I tell you the truth, at the renewal of all things, when the Son of Man sits on his glorious throne, you who have followed me will also sit on twelve thrones, judging the twelve tribes of Israel. 29And everyone who has left houses or brothers or sisters or father or mother[a] or children or fields for my sake will receive a hundred times as much and will inherit eternal life. 30But many who are first will be last, and many who are last will be first.
Jesus' response is to affirm that the apostles sacrifices will be compensated for and they will be rewarded, as will everyone who makes sacrifices out of service to Christ. Jesus finishes, however, by adding a twist, "many who are first will be last, and many who are last will be first."
What, then, does the parable mean?
The phrase "for the kingdom of heaven is like" is ambiguous in this English translation. Directly translating from the Greek is more helpful; in the Greek, this phrase asserts 'the kingdom of heaven is like the situation of...'. Jesus is drawing from an everyday or familiar employment situation and saying that the "the kingdom of heaven" is analogous to this situation.
NT Wright notes that the phrase "kingdom of heaven" was "a Jewish way of talking about Israel's god becoming king." Wright adds,
I intend to demonstrate two things: first that when Jesus spoke of the 'reign' or 'kingdom' of Israel's god, he was deliberately evoking and entire story-line that he and his hearers knew quite well; second, that he was retelling this familiar story in such a way as to subvert and redirect its normal plot.
This relates quite clearly to Peter's question in the previous chapter and Jesus's answer. The disciples will be fairly rewarded for the work they have done for the kingdom of heaven.
The situation in verses 3-7 is slightly different. The Hebrew day was divided, as ours is, into hours. The text refers to the third hour, the sixth hour, the ninth hour and the eleventh hour which correspond to our 9am, 12pm, 3pm and 5pm. The landowner went back to the market at each of these times and discovered people who were unemployed ("Why have you been standing here all day long doing nothing?" "Because no one has hired us") and offered them work. These people, however, were not contracted to work a full day for a full day's wage; the landowner said "I will pay you whatever is right," unlike with the first workers, there was no agreed on amount, the landowner instead asks them to trust him, to have faith in his integrity.
Each of these workers worked for part of the day. When evening came, around 6pm, the landowner paid the workers in the reverse order that he hired each in. The workers hired at 5pm were given a full day's wage for what was probably an hour's work. For this reason, the other workers, hired earlier in the day, expected to receive more. Again, this relates back to Peter's question. Peter is contrasting himself with others in terms of the sacrifices and work he has done for the kingdom.
It is at this point that the twist Jesus introduced in verse 30 above. The workers that were hired first were paid 1 denarius. This caused them to grumble, see verse 12, " 'These men who were hired last worked only one hour,' they said, 'and you have made them equal to us who have borne the burden of the work and the heat of the day.' " The answer given is three-fold. First the landowner asked rhetorically whether he had been unjust. The answer is clearly no. They were contracted to work for one day for a day's wage. This obligation has been kept; hence, the landowner did not deprive them of what they were entitled to. Second, the landowner pointed out that it was his money, the workers had received what was rightfully theirs and everything left over rightfully belonged to the landowner. Did he not then have a right to use his own money at his own discretion? This leads to the third point, the landowner was generously giving his money to people who did not have work. The problem is not that the workers hired first were treated unjustly or not given what they were entitled to, the issue was that others had been treated generously. Was the desire of the first workers that the other workers be stripped of these generous gifts? The issue seems to be one of envy, a desire to bring others down rather than to get what one is entitled to.
Jesus summarises this as 'the first will be last.' The point, then, is this, God is a king who will reward people for their deeds and their sacrifices. People will be given what their deeds entitle them to but God also gives generously to those who trust in him. There is a rebuke here to his disciples about envy and resentment that other people have people have been blessed by God.
 NT Wright Jesus and the Victory of God (London: SPK, 1996) 203.