Ricciardo, who edged out Sebastian Vettel in Friday's first session, clocked a 1m40.852s on his second flying lap on the ultra-soft tyres to finish 0.556s quicker than Verstappen.
Championship leader Lewis Hamilton was third, seven tenths off the pace, with title rival Vettel failing to complete a representative qualifying simulation in his Ferrari.
Ricciardo and Verstappen traded fastest laps in the early part of the 90-minute session when running the super-softs, with Ricciardo coming out on top.
Hamilton wants new Mercedes contract before summer break
Hamilton and Vettel were third and fourth during that phase, 0.428s and 1.027s off the pace respectively, but they were running the soft Pirelli tyres.
Valtteri Bottas was the first to switch to ultra-softs, but he could only slot into second, 0.027s off the pace, before team-mate Hamilton went quickest.
Ricciardo then reclaimed top spot with a 1m41.228s, 0.327s quicker than Hamilton, and then improved by nearly fourth tenths on his next lap.
Verstappen tried to respond by attempting a second flying lap, but he told the team on team radio that his tyres had gone and he backed off.
Vettel set the quickest first sector on his ultra-soft run, but he backed out of the lap when he was baulked by a Sauber.
He tried a second flier, but lost the rear end at Turn 10 and clobbered the wall, detaching an advertising hoarding which temporarily required the virtual safety car to be deployed.
Vettel did not attempt another low-fuel lap, instead turning his attention to long runs, and ended up 11th quickest with his best lap set on the soft tyres.
Ferrari team-mate Kimi Raikkonen was only ninth quickest after his ultra-soft run, 1.983s off the pace.
Bottas was fourth quickest, ahead of Renault's Nico Hulkenberg, with Stoffel Vandoorne the leading McLaren in sixth, 1.649s off the pace.
His team-mate Fernando Alonso was on course to improve his time, but had to back out of it when the virtual safety car was deployed for the Vettel incident, and he ended up seventh.
Sergio Perez was eighth, just over two tenths quicker than Force India team-mate Esteban Ocon in 10th.
Renault-bound Carlo Sainz Jr, who struggled with understeer on his long runs, was the leading Toro Rosso, nearly fourth tenths quicker than team-mate Daniil Kvyat, in 12th.
Sainz then went off down an escape road on his final lap, and had a near-miss with Vettel as he reversed back onto the track.
Romain Grosjean had a frustrating day, which included several off-track excursions, a spin and a telemetry issue, and ended up 18th, half a second and one place behind Haas team-mate Kevin Magnussen.
Spanish Grand Prix
Hamilton overtakes Verstappen to win Spanish GP
Spanish Grand Prix
Lewis Hamilton wins Formula 1 Spanish GP - As it happened