PSG host relegation battling Le Havre on Saturday
A goal in each half from Antoine Griezmann looked to have won it for Barca, after Oscar de Marcos equalised just before the break, only for Bilbao substitute Asier Villalibre to volley home in the 90th minute to send the game into the extra period.
Three minutes into the additional half hour Inaki Williams curled a stunning effort into the far corner from the edge of the box to win the match for Marcelino Garcia's side.
Messi was sent off in the 120th minute for lashing out at Villalibre as the Catalans sought an equaliser.
Victory represents a third Super Cup title for the Basque side and their first silverware since they claimed the same trophy in 2015 with a 5-1 aggregate win over Barca.