Trains (especially trains designed with that in mind) don't need that long to accelerate, this document from Siemens states that it takes 148 seconds (a little more than 2 min) for the Velaro trainsets used in China to reach 200 km/h. The Velaro trains used by RENFE are not exactly identical and it would take even longer to reach 300 but they could still easily manage 200+ on relatively short segments.
But they can only do so if the design of the railway line allows it (and it is deemed economical to go that fast). From Barcelona, there are only two high-speed lines: the one to France and the one to Madrid. Wikipedia suggests the whole Barcelona-Madrid line is operated at 300 km/h. Only the section between Lleida and Madrid is planned for 310 km/h (this article is a bit old already but it does not seem to have changed).
Looking at the schedule, the closest stop from Barcelona in either direction is Camp de Tarragona. It takes AVE trains 30 min to reach it, for a distance a little over 100 km. That's 200 km/h from station to station so, assuming it takes a few minutes to leave the city center and reach the top speed, I would expect the train to reach at least 250 or more at some point along the way.