After a five-minute VAR review of the decision to award a penalty, Mikel Oyarzabal sent the keeper the wrong way to win the 2019-20 trophy for Sociedad.
Inigo Martinez was initially sent off for fouling Portu in the box but the decision was downgraded to a yellow.
Bilbao face Barcelona in this season’s final on 17 April, looking to end their own 37-year wait in the competition.
In a game of few chances, Martinez came closest for Bilbao with a 25-yard effort that was tipped over the bar in the first half.
Former Manchester City midfielder David Silva played 85 minutes for Sociedad while ex-Arsenal left-back Nacho Monreal lasted the full game.
The two sides meet again in La Liga on Wednesday, with Sociedad currently sixth and Bilbao ninth.