The Australian road champion led the bunch sprint across the line, seven seconds in arrears of the Spaniard from Rabobank.
It's been a busy week for Gerrans as he flew to London on Sunday to take part in the Olympic Games Closing Ceremony, having been part of Australia's five-man team for the road race.
"I'm pretty content with second place," said Gerrans, following the podium presentation. "Obviously it would have been great to sprint for the victory instead, but San Sebastian is my first race back after taking a short break after the Olympics. I'm happy to stand on the podium as I begin the last part of my season."
Gerrans and his teammates conserved their energies for the final 80 kilometres of racing and when the selection occurred on the final descent of the Arkale, the 32-year-old was supported by Cameron Meyer.
"Basically, there were continuous attacks as we went up the final climb," said Gerrans. "Groups would go away and come back together. The front group was constantly breaking up and reforming. I managed to survive over the final two climbs and not spend too much energy so that I would have something left for the final."
Sánchez's daring attack inside the final 10kms netted no more than 13 seconds on the chase group but Gerrans was always going to be racing for a minor place on the podium.
"There were still plenty of guys attacking from behind who wanted to bridge across to Sánchez, but there was no organized chase to bring him back," explained Gerrans. "When he still had a few seconds in the last three kilometres, I knew we weren't going to catch him and that our race was for second at that point.
"Christian Meier did a lot of work to help me in the peloton," Gerrans added. "And Cam gave me a good lead-out in the last couple hundred meters. I'm happy to win the bunch sprint for second to finish off the team's work."