I wouldn't call it luck per se. GSP was simply ill-prepared for the fight and got TKO'd because of it. He was not mentally there and that's why he lost.
I guess Serra was lucky in the sense that he got the perfect scenario to fight GSP. It was his first title defence, he had a lot of hype surrounding him at the time, he was a huge favorite to win = tremendous pressure.
That is pretty much exactly what I'm saying. This isn't a fight between two equally skilled fighters and one of them came out on top for the night. This was a fight between an inferior and a superior fighter. Serra was lucky either that he landed that punch, or that GSP had an off night and wasn't "there". Either way, Serra should not have won that fight statistically, therefore making it a lucky win.