Barca came from 3-1 down to win thanks to a 98th minute penalty converted by Raphinha.
Afterwards, Flick said: "We won. We played against a great team that had achieved good results in its last ten matches. They have a very clear idea, and their coach has a game plan. We knew we were going to struggle.
"Raphinha is very important and always has a positive attitude that spreads to the rest of the team.
"I never watch penalties. I crossed my fingers and was very happy to see people celebrating. I told him we needed him, and he did a great job. The comeback was incredible."
"Hugely important victory"
The result sees Barca seven points clear at the top of the LaLiga table.
Flick also said, "I'm proud to have won; it's a hugely important victory. This is the mentality I want. It's fantastic. It was tough, but we tried everything to fight back, and we did."
He added, "I'm very proud and happy. It's not the first, but today was one of the great comebacks because we're at the end of the season and three more points are very good."