Serra entered the main draw thanks to a wild card and fended off the match points with a forehand and a serve at 4-5, 15-40 in the decider.
"It was not the match of the year, but this is one of my most beautiful victories," said Serra, who next plays fifth-seeded Tomas Berdych of Czech Republic.
Following top-ranked Rafael Nadal's withdrawal because of a shoulder injury, Roger Federer has been given the No. 1 seed. Federer won the Swiss Indoors on Sunday, beating defending champion Novak Djokovic in the final.
The three remaining spots for the season-ending ATP World Tour Finals will be decided at the Palais Omnisports, with Berdych, David Ferrer, Andy Roddick, Fernando Verdasco, Mikhail Youzhny and Jurgen Melzer having a chance to qualify for the London event.