The cause of the blaze in Badalona was as yet unknown as was the identity and ages of the three victims, a spokeswoman for firefighters in the region of Catalonia told AFP.
Among the injured are a baby boy, who is critical, and two adults in serious condition, the firefighting department said on its Twitter feed.
The blaze had been extinguished by late morning, leaving the 10-storey building streaked with large black marks.
Download our app and read this and other great stories on the move. Available for Android and iOS.