No biggie, but I always suggest doing SF and PG the other way around, like starting with PG and then hitting SF. There are a few reasons, but they're pretty subjective. One is that PG in the morning (around 9-ish) isn't as crowded, and the weather is cooler. Plus, on your way to SF (all downhill, by the way!), you can stroll through the cosy Gràcia neighbourhood, which is super charming.
If you're up for it, follow the YELLOW route on this map http://bit.ly/DIYroute-pg-sf
It covers all the must-see spots in Gràcia https://www.youtube.com/watch?v=wHCbplLBxBU. Fun fact: Gràcia was founded in 1626 when they built a convent called Nostra Senyora de Gràcia (Our Lady of Grace). It used to be an independent town until Barcelona swallowed it up in 1897, along with some other villages nearby. As the Eixample district expanded in the 19th century, Barcelona grew northward and connected with Gràcia.
Just so you know, Gràcia isn't packed with monuments or famous landmarks (except for a couple, like Casa Vicens https://www.youtube.com/watch?v=PARxe949GGM It doesn't have wide streets or big parks or anything super fancy. So don't expect to be blown away. Its charm lies in the "small town" vibe within a big city. It's like a glimpse into what Barcelona was like a century ago. To me, the essence of Gràcia is best captured in Carrer Astúries, near the Fontana Metro station (on the green line L3), and Carrer Verdi. They're both short pedestrian streets (well, all the streets in Gràcia are pretty short!) with cute shops, cafes, grocery stores, and lots of people just going about their business, chilling, meeting up with friends...
Oh, and even though Carrer Verdi has a row of lively bars, it's nothing compared to the crazy traditional week-long party that attracts around 1.5 million people in August every year. That you definitively need to see, it's the Festa Major de Gràcia. What's a 'festa major' you might ask... https://vimeo.com/286796680 During those days, many events occur in Gràcia, like the famous contest of street decoration: http://www.youtube.com/watch?v=Yd4rzg18s1Y
So, let's say you book PG for around 10-ish, you'll probably be done by noon-ish. After that, head towards the yellow route (it's like a 30-minute walk) and explore the area. Once you spot a restaurant you like (there are tons!), grab some lunch. If you're up for a Japanese twist, give Kibuka a shot. It's on Carrer Goya, 9, almost at the end of the yellow tour. If you prefer to taste a more traditional Catalan restaurant, I'd probably stop at Goliard or at Bar Casi. Looking for a veggie or a gluten-free meal?, then Restaurant Gut.... check my proposals at the above map. Remember, there are plenty more, these are just some of my personal choices.
I'd suggest booking SF for around 3:30 pm or 4 pm. A plus is that the light at that hour is less 'vertical' and the effect in the inside of the SF stained-glass is breath-taking. It'll take you about 30 minutes or so at a normal pace to walk from the end of the yellow route (bottom part) to SF. When you're done with SF, you might wanna take a 10-minute stroll down Avinguda Gaudí (off SF) towards the Hospital de Sant Pau (http://www.santpaubarcelona.org/en). It's another awesome example of Modernism REALLY worth checking out. Or, if you're feeling thirsty, just grab a pint at the old Michael Collins pub across the square from SF.