What if Gray Davis resigns?

Even if he ends up resigning, Cruz Bustamante* would probably only be the temporary Governor; as long as all the other conditions of the recall had been met, the recall election would go forward, and the winner would be the new Governor.

That's discussed here, and the Elections Code Section in question says this:

11302.
If a vacancy occurs in an office after a recall petition is filed against the vacating officer, the recall election shall nevertheless proceed. The vacancy shall be filled as provided by law, but any person appointed to fill the vacancy shall hold office only until a successor is selected in accordance with Article 4 (commencing with Section 11360) or Article (commencing with Section 11380), and the successor qualifies for that office.

*Bustamante is a former member of the racial separatist organization Mecha.