The 33-year-old was taken care of on the pitch after being seen holding on to his chest just moments before half-time and then replaced during the break.
Doctors took care of Aguero as he lay on his back, but the player was able to leave the pitch on his own.
“I was told he was feeling a little dizzy. I just found out he was taken to the hospital and I can’t say much more until I find out,” Barcelona care coach Sergi Barjuan said after the match.
Aguero’s former Manchester City club posted a message on Twitter in which he wished the striker all the best.
“Everyone in Manchester City wishes you a speedy recovery,” it read. “We’re with you.”
Aguero started for the first time at Camp Nou after a summer move from the Premier League club.
The striker is recovering from injury and Barcelona have started the season poorly.
Ronald Koeman was sacked last week as coach due to poor team form and the club is currently in ninth place in La Liga.
.