The force of the crash crumpled the front of the train against the buffer and detached a sheet of metal.
Twenty of the injured, including the driver, were taken to hospital, emergency services said, while paramedics treated others on stretchers on the platform.
They had previously put the number of the injured at 39.
Many of the passengers were already standing, ready to get off, when the train crashed, the newspaper La Vanguardiareported.
The train was coming from the village of Sant Vicenc de Calders in the province of Tarragona on the R2 line of the Rodalies commuter rail service, emergency services said.
The state-run railway company Adif said an investigation had been opened.