The stage came down to a selection of eight riders that included Gerrans and Valverde.
Gerrans had the better line going around the final left-hand corner only metres from the finish, but Valverde was able to jump around him to cross the line first.
This is the first race for Valverde since he ended a two-year doping ban, which was connected to cycling's Operation Puerto scandal in Spain six years ago.
Gerrans is the key rider in the Santos tour for the new Australian professional team GreenEDGE and their plan nearly worked to perfection.
The tour will now come down to Sunday's final stage, a 90km street race just outside the Adelaide CBD.
It will be only the second time in the tour's history that the time gaps have been this tight going into the final stage.
The last stage of this tour always ends in a bunch sprint and GreenEDGE will probably try to make sure that Gerrans finishes ahead of Valverde, wherever they are in the field.
Valverde is unlikely to be able to score bonus seconds at the intermediate sprints during the stage.
- AAP