The 32-year-old Brazilian clocked his fastest lap of 1min 21.901sec in the final minutes of a closely-contested session run in dry, but gusty and cloudy conditions at the Circuit de Catalunya.
In front of Ferrari president Luca di Montezemolo, who arrived to watch the session from his team's pit wall, Massa's lap lifted him 0.006sec clear of nearest rival Finn Kimi Raikkonen of Lotus and ahead of third-placed Australian Mark Webber of Red Bull.
Raikkonen's Lotus team-mate Frenchman Romain Grosjean was fourth ahead of defending triple world champion German Sebastian Vettel and sixth-placed home hero and two-time champion Spaniard Fernando Alonso in the second Ferrari.
Briton Paul di Resta, who survived a frightening moment yesterday when his left rear tyre delaminated at high speed, was seventh ahead of Force India team-mate German Adrian Sutil, Briton Lewis Hamilton of Mercedes and Frenchman Jean-Eric Vergne of Toro Rosso.
More From This Section
Hamilton's Mercedes team-mate German Nico Rosberg was 11th ahead of Briton Jenson Button, who continued to struggle in the under-pace McLaren, despite a raft of new parts on his car.
"It looks very close," said Red Bull team chief Christian Horner. "But I must say Mark Webber loves it here and, for me, he is the king of the final sector.
"I am expecting a very strong performance from him, but Ferrari also look strong and Fernando Alonso is clearly responding to the crowd.