Stanford fell behind early, dominated the second and third quarters and held off Cal in the fourth for a 31-28 victory Saturday in a steady rain at Stanford Stadium.