Most modern scholars take Luke 1:5 as a reference to Herod the Great, which would agree with the dating of Jesus' birth in Matthew's gospel. But if Luke 1:5 is referring to Herod the Great, then how can the census of Luke 2 be referring to a census that didn't occur until around ten years after that Herod's death, as some critics claim?
Richard Carrier proposes two possible answers. He thinks that Luke 1:5 is referring to Herod Archelaus, but he suggests a second possibility. He argues that the passage might be referring to Herod the Great, as most scholars believe, but that John the Baptist was born more than ten years before Jesus. Thus, John the Baptist turned twelve years old (supposedly referenced in Luke 1:80) around the time when the events of Luke 2 began.
Both of Carrier's proposals are highly problematic. I've already discussed some of the patristic references to the timing of Jesus' birth and the distinction between the Herod who ruled while Jesus was born and Herod Archelaus. Matthew's gospel explicitly distinguishes between the two (Matthew 2:22), and, as discussed earlier, there was widespread acceptance of Matthew's gospel and harmonization of his gospel with Luke's from the earliest post-apostolic generation.
The second possibility Carrier suggests, involving more than a decade of time between the births of John the Baptist and Jesus, is also widely contradicted by the patristic and other ancient sources. Over and over again, a wide variety of sources from a wide range of locations refer to John the Baptist and Jesus as being in their mothers' wombs at the same time: Protevangelium Of James (12-13, 22-23), Tertullian (A Treatise On The Soul, 26), Hippolytus (On Christ And Antichrist, 45), Origen (Commentary On John, 6:30), Peter of Alexandria (The Canonical Epistle, 5), etc. It seems that there was an early, widespread consensus that John and Jesus were born within months of one another, not years.
Carrier also proposes a longer amount of time than is usually assumed between the beginning of John the Baptist's public ministry and the public ministry of Jesus. If the dating of John's ministry in Luke 3:1-2 is applied to Luke 3:23, then it seems unlikely that Luke dated Jesus' birth at 6 A.D. Thus, Carrier argues for the passing of "an interval of some years" between Luke 3:1-2 and 3:23. Once again, though, the earliest post-apostolic sources contradict Carrier: Marcion (Tertullian's Against Marcion, 4:7), Irenaeus (Against Heresies, 3:14:3), Clement of Alexandria and some other sourcs he mentions (The Stromata, 1:21), etc.
Raymond Brown has suggested that an ancient translation of Psalm 87:6, which refers to a census, might have inspired Luke's census account (The Birth Of The Messiah [New York, New York: Doubleday, 1999], pp. 417-418). He makes reference to a passage in which Eusebius of Caesarea cites that Psalm as a prophecy (p. 418). But, in addition to the problems with Brown's argument that Darrell Bock discusses (Luke, Volume 1, 1:1-9:50 [Grand Rapids, Michigan: Baker Books, 1994], p. 209), I'm not aware of any Christian earlier than Eusebius who made such an association. The early post-apostolic sources frequently discuss prophecy fulfillment, but the earliest sources to address the census make no appeal to Psalm 87, as far as I know. If the Psalm was so influential as to inspire Luke to include in his gospel a census account that Brown considers "dubious on almost every score" (p. 413), then we ought to ask why the earliest sources to comment on the census seem so uninterested in Psalm 87 while they're so interested in other Old Testament passages in other contexts.