You still get the minute if the steed takes damage.
This is an interesting spell, in that it gives us a little extra after the spell ends. I think that swapping the order of these sentences may help make this more clear:
The spell ends if you use an action to dismiss it or if the steed takes any damage. When the spell ends, the steed gradually fades, giving the rider 1 minute to dismount.
Here we can see clearly that it doesn't matter how the spell ends, we still get another minute to dismount.
Unless the mount is killed
We still treat the phantom steed as a regular mount. This seems evident from the spell description:
The creature uses the statistics for a riding horse
So the steed has stats and hit points, and so it would seem that the rules for losing all of your hit points would apply in some way.
To this end, I would rule that if the steed takes damage, you still have a minute for it to act like an normal steed, unless it is killed, at which time all the things that would normally happen when your horse is killed out from under you happen. Specifically, your mount would dead, which means it would fall prone, and this rule from the Mounted Combat section applies:
If your mount is knocked prone, you can use your reaction to dismount it as it falls and land on your feet. Otherwise, you are dismounted and fall prone in a space within 5 feet it.
And the corpse of your mount will fade when the minute is up.