USC quarterback Matt Barkley nearly led the Trojans into field goal range as regulation time expired but couldn't quite find the range, sending the contest into overtime.
Stanford (8-0, 6-0 Pac 12) and USC traded touchdowns in the first two overtimes.
The third OT was marked by Stepfan Taylor's 5-yard touchdown run on the first possession for the Cardinal, followed by Luck's 2-point conversion pass to Coby Fleener.
USC (6-2, 3-2) couldn't answer, however, as Curtis McNeal fumbled the ball into the end zone on the Trojans' second snap and Stanford recovered, extending the nation's longest winning streak to 16.
Celebrity Families of 2014 [PHOTOS]