I went there with 12yo so I may not have all the best suggestions, but I imagine that a 6yo would like some of the following (read up on them before you go):
Parc Guell (there's a free outer bit, then you have to pay for the main bit which is quirky and should be fun for a child to explore)
Cable car ride (tip: catch it at the Montjuic end and you'll probably avoid queues - we didn't realise this! - there are gardens and other things to see on Montjuic but you'll have to figure how to get up there).
La Sagrada Familia is amazing, but may not entirely suit a 6yo inside if they like running around and being noisy. (Tip there is to buy tickets in advance - we went there one day and bought tickets for the next morning).
Use the Metro to get around - fun, reliable and straightforward to use - make sure you have a good map!
Going to a tapas bar in the evening is child-friendly: we sat next to a family with a baby late one evening.
You're bound to visit La Rambla, so don't miss La Boqueria market - fantastic colourful sweet stall when we were there, but lots of fruit, ham and cheese to sample.
There are beaches.
Also, look at Magic Fountain.