The Italian, a seven-time world champion in the top class, has not won a race since the 2010 Malaysian Grand Prix, and just two weeks ago suffered the indignity of tumbling out of his home race on the opening lap.
But the 34-year-old showed some of the old magic remains as his late fast lap of one minute 42.297 seconds jumped him from the middle of the pack to the top of the standings.
Lorenzo, looking to close his 12-point deficit to championship leader Dani Pedrosa, had topped the times for much of the session and had led the way in the morning running, but eventually missed out to his team-mate by just under five hundredths of a second.
Pedrosa was next up on the first of the Repsol Hondas, with Britain's Cal Crutchlow fourth overall thanks to a good lap aboard his Tech 3 Yamaha in the morning session.
Alvaro Bautista took a superb fifth overall on the satellite Gresini Honda machine with Marc Marquez sixth as the Spanish rookie took a circumspect approach to practice, after his crash-filled weekend at Mugello last time out.
Nicky Hayden and Andrea Dovizioso were seventh and eighth on the factory Ducatis, while Stefan Bradl and Aleix Espargaro rounded out the top 10.
Crutchlow's team-mate Bradley Smith, nursing the hand and wrist injuries he suffered two weeks ago, was 14th after another crash which he limped away from.
A delighted Rossi, for whom this represented the first time he had topped a session since his return to Yamaha from Ducati, said: "I love this track; it is one of the best and the M1 is always great here in Catalunya.
"It is just Friday but I am very happy to be in front, although we have still a lot of work to do.
"We have to decide which tyre to use and we have some corners and sections where we have to improve for tomorrow [Saturday].
"Anyway, it is great to be back on top."