Athletic played a man down from the 74th minute, and two men down from the 80th because of red cards in a drama-filled first-leg match in the round of 16.
Aritz Aduriz scored and set up another goal in the first half for Athletic, and Lionel Messi scored for Barcelona from a free kick early in the second half. Messi hit the post from inside the area three minutes into stoppage time, and Paco Alcacer missed the open net off the rebound.
"We reacted well and deserved a draw for all the chances we created," Barcelona coach Luis Enrique said. "We just lacked that touch of precision in front of the goal."
Athletic beat Barcelona for only the third time in 32 matches over the last 10 years.
In that period, Barcelona has beaten Athletic in three Copa del Rey finals, won their last three league matches, and won both legs of their quarterfinal match-up last year.
But a draw next week in the second leg at Camp Nou will be enough to send Athletic to the quarterfinals.
"We are happy," Atlhetic coach Ernesto Valverde said. "We earned a small advantage and we will try to maintain it in the second leg."
Athletic took control early as Aduriz's header opened the scoring in the 25th, and Inaki Williams padded the lead after a pass by Aduriz in the 28th.
Messi pulled Barcelona closer by converting a free kick in the 52nd, with the ball just barely crossing the line after a save attempt by Athletic goalkeeper Gorka Iraizoz.
Second yellow cards by midfielders Raul Garcia and Ander Iturraspe reduced Athletic, which had to endure a siege by the visitors.
Athletic's only loss at San Mames this season was against Barcelona in its first home game in the league. Since then, it has won 11 games and drawn one.
In other first-leg matches, Real Madrid defeated Sevilla 3-0 at home on Wednesday, while visiting Atletico Madrid beat Las Palmas 2-0 on Tuesday. All return matches are next week.