If powering the Pi via the micro-USB socket, all RPis except Zeros have a self resetting polyfuse which should prevent damage.
In the case of a Zero or powering other RPis via the GPIO header there is fuse provided. Shorting the 5 volt and ground pins will cause distress to the PSU which can kill it.
Which is why I recommend to unplug the Pi before doing any wiring. Then double check your work and then, only then, apply power to the Pi.