Luke 13:23-30
23 Then said one unto him, Lord, are there few that be saved? And he said unto them,
24 Strive to enter in at the strait gate: for many, I say unto you, will seek to enter in, and shall not be able.
25 When once the master of the house is risen up, and hath shut to the door, and ye begin to stand without, and to knock at the door, saying, Lord, Lord, open unto us; and he shall answer and say unto you, I know you not whence ye are:
26 Then shall ye begin to say, We have eaten and drunk in thy presence, and thou hast taught in our streets.
27 But he shall say, I tell you, I know you not whence ye are; depart from me, all ye workers of iniquity.
28 There shall be weeping and gnashing of teeth, when ye shall see Abraham, and Isaac, and Jacob, and all the prophets, in the kingdom of God, and you yourselves thrust out.
29 And they shall come from the east, and from the west, and from the north, and from the south, and shall sit down in the kingdom of God.
30 And, behold, there are last which shall be first, and there are first which shall be last.
Does this passage teach that anyone who "works iniquity" (verse 27) will be rejected by the Lord?
Firstly, note how similar this is to what Christ says near the end of the Sermon on the Mount, covered further in this article:
Matthew 7:21-23
21 Not every one that saith unto me, Lord, Lord, shall enter into the kingdom of heaven; but he that doeth the will of my Father which is in heaven.
22 Many will say to me in that day, Lord, Lord, have we not prophesied in thy name? and in thy name have cast out devils? and in thy name done many wonderful works?
23 And then will I profess unto them, I never knew you: depart from me, ye that work iniquity.
And again to the statement in Matthew chapter 25, in the parable of the ten virgins, covered in this article:
Matthew 25:10-12
10 And while they went to buy, the bridegroom came; and they that were ready went in with him to the marriage: and the door was shut.
11 Afterward came also the other virgins, saying, Lord, Lord, open to us.
12 But he answered and said, Verily I say unto you, I know you not.
In all three instances, we have people calling out to the Lord twice - "Lord! Lord!" - before they get an answer, and the answer in all three instances is that the Lord either doesn't know them, or "never" knew them.
In each of these passages, those whom the Lord "doesn't know" are unbelievers, and this passage in question from Luke chapter 13 is probably the most obvious testament to this fact, as in it we see that Christ is addressing unbelieving Jews who He had preached to:
Luke 13:28-29
28 There shall be weeping and gnashing of teeth, when ye shall see Abraham, and Isaac, and Jacob, and all the prophets, in the kingdom of God, and you yourselves thrust out.
29 And they shall come from the east, and from the west, and from the north, and from the south, and shall sit down in the kingdom of God.
The physical Jews - those originally intended to be "the children of the kingdom" - are being cast out, and replaced with those coming from the East, West, North, and South - all nations:
Matthew 8:10-12
10 When Jesus heard it, he marvelled, and said to them that followed, Verily I say unto you, I have not found so great faith, no, not in Israel.
11 And I say unto you, That many shall come from the east and west, and shall sit down with Abraham, and Isaac, and Jacob, in the kingdom of heaven.
12 But the children of the kingdom shall be cast out into outer darkness: there shall be weeping and gnashing of teeth.
This theme of the Jews being replaced as God's chosen people is a major subject attested to by dozens, if not hundreds of passages in the New Testament.
But, to answer the question posed at the beginning of this article, no, this passage does not teach that a believer who "does iniquity" will be sent to Hell. The aforementioned article on Matthew 7:21-23 covers many reasons why these people are not believers, and the fact that all believers are "known" by the Lord, but in brief, no believer is seen before the Lord characterized by whatever iniquity they did in their flesh, but rather by their sinless new nature that they received upon believing in Christ (1 John 5:1):
1 John 3:9
9 Whosoever is born of God doth not commit sin; for his seed remaineth in him: and he cannot sin, because he is born of God.
Those who don't have the new birth will all be characterized by their "iniquity", because "there is none righteous, no, not one" (Romans 3:10), "there is none that doeth good, no, not one" (Romans 3:12), and "without faith it is impossible to please God" (Hebrews 11:6).
This passage does not teach that a misbehaving believer will be disowned by the Lord, but is rather aimed at unbelievers, and specifically, unbelieving Jews.