Nadal lost his serve to start the match but recovered in the following game of his opening match at the clay-court tournament.
''He started very aggressively, getting to every ball, taking the initiative,'' Nadal said. ''It was very important to break him right back. After that, everything was a bit easier.''
The top-seeded Nadal had 16 break points, converting four of them. He saved three break points against the 50th-ranked Granollers.
Seeking his ninth title at the Barcelona Open, Nadal will next play wild-card entry Albert Montanes, the 104th-ranked Spaniard who defeated 14th-seeded Joao Sousa of Portugal 6-1, 6-3.
Nadal has won all his three matches against Montanes, who is coming off a semifinal appearance in Morocco.
Nadal, ranked fifth in the world, won the Monte Carlo Masters last week for his first title of the year.
Two-time Barcelona Open champion Kei Nishikori advanced to the third round by beating Thiemo de Bakker 6-4, 6-2. He broke the Dutchman's serve three times.
''The conditions were tough for both of us because of the wind,'' said the second-seeded Nishikori, who will next play 33rd-ranked Jeremy Chardy of France. ''But I played a solid match.''
Nishikori is trying to become the third player to win three consecutive titles at the Barcelona Open, joining Mats Wilander and Nadal. The 26-year-old Japanese player has won 11 straight matches at the tournament.
Also, eighth-seeded Viktor Troicki of Serbia beat Hungarian qualifier Marton Fucsovics 6-4, 1-6, 6-0 and 12th-seeded Fabio Fognini of Italy defeated Mikhail Youzhny of Russia 3-6, 6-0, 6-1.
Alexander Zverev of Germany beat 15th-seeded Thomaz Bellucci of Brazil 6-3, 7-6 (3), 7-5 and 10th-seeded Philipp Kohlschreiber of Germany eased to a 6-2, 6-1 victory over Pablo Carreno Busta of Spain.