Toby,
I've used early morning flights on some past trips including last September out of Vienna, and would suggest leaving at least two hours. As I recall, the trip from Barcelona to the airport will be about 45 minutes. Traffic should be light at that time of the morning, but be sure to pre-arrange that trip with your hotel.
Which airline will you be using on the flight from Barcelona to Amsterdam?
There probably won't be much a queue at security at that time of the morning, but it's still wise to be prepared for "unexpected delays". At that time of the morning, I found that a lot of the food service joints in the airport still hadn't opened, and even getting a cup of coffee was a challenge (there WAS a queue for that). By the time you're heading for the departure gate, there should be a place open where you can buy a sandwich or something. Food will probably be available on the plane at extra cost, but I've found that the quality is not usually that good, and it's overpriced.