This is one that I experience every morning. If you're walking in a flow of commuters, then you're part of a steady stream of people. There are people in front of you, and there will be people behind you. Maybe they're right there, maybe there's a few yards away, but they're there.
You come to a door. No, I don't expect you to step out of the way and play doorman while other people pass(*). Try it at the wrong time and you'll find yourself standing there for five minutes wondering if someone else will take it from you so that you can go through (they won't).
It's easier than that. Approach the door. LOOK BEHIND YOU. Somebody coming? Great. As you walk through, hold the door long enough so that the person coming will be able to comfortably reach for it, rather than having it close in their face. This could mean giving it an extra shove open so that it has more time to glide closed, or it could mean simply pausing in your stride so that you're still holding the door when the person behind you catches up to you.
It's really that easy. It's a nice thing to do. If you're the person coming up behind, you'd like somebody to do it for you rather than let it close on you. No sexism here, I offer this courtesy to men and women alike and I'd hope to receive the same in return.
Doing this, by the way, keeps the flow of people moving through the door. If you approach a closed door you have to stop your forward progress, open it, then continue. While you do that, the people that were coming up behind you likely have to break stride to keep from walking into you. But if the door remained open because the first person through held it, then you just need to reach out to keep it open and keep walking.
If you are the one coming up behind? It's common courtesy to show a little extra effort to reach out for the door. Just like if you started walking through a crosswalk and the light turned green, then yes you still have the right of way but it's still nice of you to pick up the pace a bit. Whatever you do, kindly don't saunter through the door without touching it, like I'm the doorman. I'm not holding it for you, I'm waiting to hand it off to you. There's a difference, ya know.
Try it the next time you're entering the train station (or wherever). Or, watch to see if other people do it. It's really quite rude and annoying when you realize how many people just look out for themselves, without the simple realization that if people start trying to make somebody else's day a little nicer, that somebody might be you.
(*) The "step aside and let others pass first" is indeed very polite, just not terribly practical in a crowd. If you're in a very small stream of people, and in particular if you're a gentleman and it's a lady coming up behind you, then there's nothing wrong with stepping aside to let her pass. Of course if you happen to be walking with a companion it is also polite to do this and let your companion pass first.