A Robert Lewandowski goal on the hour mark was enough for Barca to secure the points on Sunday.
Flick said afterwards: "It was a difficult match, hard work. It was very important to get the three points considering Madrid's result yesterday".
"I showed them the spaces where we had to attack, hold positions, look for good connections, short passes. The second half was much better.
"I'm happy with the team. They tried to score, it wasn't easy because they defended very well. It's their job. I always say that it's better to be a 9 inside the box. It was very important to score in such a difficult match."
On Real Madrid's defeat at Espanyol, Flick also said: "Honestly, I didn't see it yesterday. Really. It's like that. The last few days have been stressful and it's best to go to bed early. In the morning I did see WhatsApp. I don't care about the situation, we have to focus on ourselves and it was a tough, complicated game. Alavés defends very well.
"Atletico and Real Madrid are fantastic teams, but we have to do our job. We are a few points behind. We have to win and put pressure on them. The best decision yesterday was to go to sleep. What I am looking for is to improve my team's performance, not worry too much about Atletico and Real Madrid."