A commuter train slammed into the end of the platform during the morning rush hour at a busy station in Barcelona on Friday, leaving 54 people injured, emergency services said.