Nine residents on the ground floor of the retirement home in the small town of Agramunt, northwest of Barcelona, were caught in the sudden flooding.
"Only five of them were able to escape," deputy mayor Xavier Secanell said on national radio.
The River Sio burst its banks before dawn on Tuesday, inundating the riverside homes in the town, located about 100 kilometres (60 miles) from Barcelona.
Firefighters in the region also said on Twitter that they had been called out for "nine people, four of whom were dead," in the retirement home.
Spain is suffering the worst storms in two decades with much of the country on high alert for wind, rain and floods.