This is a French expression which means to leave… but it’s a one way business !
You are asked to “prendre la porte” which would translate into “take the door” when you are – firmly – asked to leave the room.
You could also decide to “prendre la porte” when it is not just an ordinary calm exit but a rather tempestuous one… we could say “to storm out (the door)”
There is something theatrical in this type of exit !