The Spaniard, who lost the Monte Carlo Masters final to new number one Jannik Sinner on Sunday, can reclaim top spot if he triumphs this week in Barcelona, as he did in 2022 and 2023.
Alcaraz, who finished as runner-up last year in Catalonia, started the first round clash slowly but found his rhythm in a dominant second set.
"I didn't have much time to adjust in terms of training - this morning was the first practice session I'd done here in Barcelona, which makes it a bit hard to find good sensations at the start," said Alcaraz afterwards.
"I'm happy to have come through the problems I had in the first set.
"Little by little I started feeling maybe a bit better, and I'm happy to win the match in straight sets and give myself another chance to try to feel a bit better in the next round."
Alcaraz received some treatment from the physio on his forearm but said he hoped it was "nothing" and without time to rest between tournaments that it was normal to have "little niggles".
World number 130 Virtanen started strongly in front of a full crowd at the court named after Spanish great Rafael Nadal, pushing hard on Alcaraz's serve, while holding his own relatively comfortably.
However, Alcaraz broke in the 10th and final game of the first set to take the lead.
In the second set, the players exchanged breaks before Alcaraz broke to love and consolidated for a 4-1 lead.
Alcaraz opened up a triple match point on Virtanen's serve and hit a cross-court winner to capitalise on the first of those.
The seven-time Grand Slam winner will face Czech Tomas Machac in the second round.
Earlier on, second seed Lorenzo Musetti defeated Martin Landaluce 7-5, 6-2 for his first win since the Australian Open.
Australian Alex de Minaur overcame Sebastian Ofner 7-6 (9/7), 6-4, while Karen Khachanov suffered a surprise 6-3, 6-4 defeat by Camilo Ugo Carabelli.
