Now that I've finished reading an annotated translation of the Discourses on Livy (translated by Julia Conaway Bondanella and Peter Bondanella. Oxford University Press, 2008), I can answer my own question.
Livy's Ab Urbe Condita is Machiavelli's main source of citations and references, so there is a benefit in reading that book. However, Ab Urbe Condita is a long work and it is by no means Machiavelli's only source: the author also cites many other Roman and Greek authors and makes many references to the more recent history of Italy (mainly 1440 - 1510). So in order to be fully prepared for reading the Discorsi, one would also need to be familiar with the following works:
This is a lot to read, and Machiavelli often doesn't mention what the source of a specific statement of event is. This means that an annotated edition is very valuable for anyone who is not an expert in Ancient historiography and Italian history.
It is also worthwhile, though not necessary, to read a modern history of the Roman republic, in order to contrast a modern account of Roman history with the version that Machiavelli was familiar with. Machiavelli and the authors he cited did not have access to the archaelogical data and critically edited historical sources that present-day historians have, and this led to an overreliance on oral and written traditions. If Machiavelli had had access to a modern account of the history of Roman republic, it is unlikely that he would have glorified many of the historical figures he mentions in the Discorsi.