@ArchonOSX's answer is good, as long as the local drainage is good enough. If not, I'd install a trench drain that extends further down the slope to where it can discharge back onto the sidewalk, but that depends on the situation.
I'm guessing the door is 8' wide, and the sidewalk falls 5" across it, which means the sidewalk has about 1/2" per foot pitch.
Let's say you install a level trench in front of the door, starting 1" below the door and with a depth of 4" (with a grate on top). At the downhill end of the door the trench bottom will be 4" below the sidewalk.
Then you have to get rid of the water. Drains should have 1/8" per foot pitch, so the sidewalk will fall 3/8" per foot faster than the drain. So, it will take another 11 feet before the sidewalk is below the bottom of the drain. If you have that kind of space you can just extend the trench to that point and then turn it back to the sidewalk.
If not, improvise.
Here in my town, I have seen foundation repair that is great for loss of substructure support, such as soil compaction or erosion. What they do is bore a hole in the slab, and inject expanding urathane foam into the slab underside, as they watch the slab level and cracks. What happens is under thousands of pounds of pressure, the foam replaces missing soil, and litterally lifts the sagging slab. Since the foam is like a liquid, it flows to where it is needed, and supports very evenly. Once the engineer is satisfied he has the right amount of list, they turn the machine off, and shut the valve, but leave the fitting connected. They wait for the foam to harden, before they disconnect. At that point, the repair is pretty much permanent, at least until more erosion or settling causes the need to repeat.
As long as there isn't a place for the foam to escape, this works great. If there is a sinkhole, or an opening that lets foam out, they may have to inject, pause for a day, and inject again... till they get the needed results. Obviously this is for a slab on or in the soil. For slabs poured over basements, screw jacks and perhaps beams are installed in the basement.
But this is a job for a foundation repair expert. This is one of those areas a do-it-yourselfer can do more harm than good. A foundation repair company will have insurance for liability, in case something goes wrong that is his fault. If you do it yourself, you could make things worse, and there is little limit to what worse means when it comes to supporting a house on a failing slab.
Best Answer
When faced with a similar problem I opted to cut the blue part about 4 inches away from the garage slab, break and remove the concrete, and put in a pre fabricated French drain. The cutting was done with an old skilsaw and $15 diamond blade, and busting was with hand tools. About a 1 day project.![enter image description here](https://i.stack.imgur.com/yKFbv.jpg)