A hard-fought quarter-final appeared destined for extra time until Williams applied enough of a touch to Ibai Gomez's in-swinging cross from the right flank to send the ball beyond Marc-Andre ter Stegen and into the net.
The winner in the third minute of stoppage time saw Athletic through to the last four and, with Real Madrid surprisingly beaten at home by Real Sociedad just hours earlier, it means neither of Spain's two heavyweight clubs are left standing.
UNBELIEVABLE!— ESPN FC (@ESPNFC) February 6, 2020
Athletic Club win it in stoppage time -- ending Barcelona's Copa del Rey campaign! pic.twitter.com/xjL8UdniVf
Lionel Messi, who had made the headlines in the lead-up to the game for criticizing director of football Eric Abidal, had Barca's best chance, only to be denied by Unai Simon's outstretched left leg late in the second half.
The Athletic goalkeeper had also denied substitute Antoine Griezmann but, for the first time in seven seasons, the Catalan club will not be involved in the final of the competition.