Without Messi, Xavi Hernandez, Dani Alves, Jordi Alba, and goalkeeper Victor Valdes, Barcelona still dominated a Granada side that had lost only once away this season, to remain unbeaten with a league record of 13 wins and a draw.
"Barcelona was missing players? I didn't realize it," Granada coach Luis Alcaraz said.
Granada, 2-0 behind, played a man down from the 66th after Manuel Iturra received his second booking.
Vela started Sociedad's comeback against Celta from 3-1 down by heading in a free kick in the 61st, and Celta defender Andreu Fontas was dismissed for his second yellow card four minutes later.
Vela leveled at 3-3 in the 78th and held off his marker to collect Antoine Griezmann's lobbed pass to roll in the dramatic winner in the 81st.
"You work hard each game to help as much as you can and today was a great day for me," Vela said. "And, fortunately, my goals got us the win, because if not it would have been bittersweet."