H.D.
Sometimes, children fall into a habit of crying or "melting down" during certain transitions. I've seen it many times. When I saw a habit forming, I tried to change the circumstance. For example, when children cried because their parents came to the door to pick them up from care and they would have to leave the house, I started to have the child play outside ten minutes or so before the parent arrived. This changed the situation and the crying was resolved.
In the case of your son, here are some suggestions:
Create a new ritual. Play a game with him where he ends up in the house without a lot of talk and warnings. Perhaps a "follow the leader" game.
Go in a different door. Do you usually go in the front or back? Try the other one.
Some children love to ring a doorbell or use a knocker. This is an inviting way to go inside.
A transition song is also helpful. Many preschools sing the same song every time it's time to go inside. It's easy to make one up too. "It's time to go inside/ It's time to go inside/ We're going to have lunch and so it's time to go inside."
Have a Treasure Ritual. Ask your child to find one nature treasure (rock, leaf, stick, snail shell, anything...)and have a Treasure Bowl almost immediately inside the door. When your son notices something special, let him know that he can put it in the treasure bowl, and when it's time to go inside, you can tell him "oh, I see it's time to put that leaf in the treasure bowl."
All these suggestions aside, the meltdowns during transitions is very common. Do your best to keep these times playful, and then do your best to be empathetic. He must really love playing outside to be so sad. Growing up and adjusting to the adult schedule and expectations is hard work. He might like to make a book with you sometimes about "Things I like to do outside"... just ask him what he likes to do. Acknowledging his feelings is a great way for him to feel understood by you.
My best...three's are such their own people!