To expand on the information in other answers: As far as I can find, modern classical scholarship considers it mostly genuine. Briefly, some version of the problem was certainly associated with Archimedes in his lifetime; and our surviving poetic version is at least authentically classical, and quite possibly by Archimedes himself.
In more detail: As OP notes, the modern history of the problem begins in 1773, with the German antiquarian Gotthold Ephraim Lessing discovering it in the form of a Greek poem in an classical manuscript, together with a short accompanying note (aka “lemma” or “rubric”). Lessing’s edition, with commentary, is available online: Zur Geschichte und Litteratur : Aus den Schätzen der Herzoglichen Bibliothek zu Wolfenbüttel, 1773, Gotthold Ephraim Lessing, p423 et seq.
There seems no doubt that the manuscript Lessing found it in is authentically classical. It’s republished with commentary in the comprehensive 1915 volume of Archimedes’ works Archimedes: Opera omnia cum commentariis Eutocii, ed. Heiberg, (vol.II, pages p528–534), and translated in the selection Greek Mathematical Works, ed. Ivor Thomas, Loeb Classical Library, 1941. The manuscript itself is known as “Cod. Guelf. 77 Gud. graec.”, where “Cod. Guelf” catalogues all manuscripts at the library of Wolfenbüttel, and “Gud. graec.” refers to the Greek collection of Marquard Gude; other texts from the collection are available online, but this one doesn’t seem to be digitised yet.
The question of its specific authorship is much more debated: the most authoritative survey I can find is given by Peter Marshall Fraser, in his book Ptolemaic Alexandria (1972). Excerpting the relevant parts (footnotes suppressed, emphasis mine):
Vol.I, p402:
There also survives under the name of Archimedes a lengthy elegiac poem containing the so-called Cattle Problem (Βοικον προβλεμα), in which the problem of indeterminate analysis is treated. This tour de force has often been regarded as spurious, and may be so. However the lemma to the poem, which seems to preserve an authentic historical tradition, indicates that in any case the original work, on which the poem was based, was sent by Archimedes in Syracuse to Eratosthenes in Alexandria, apparently to be circulated among mathematicians in the city.
Vol.I, p407:
The form which the work takes is unusual, though not unparalleled — it is a poem of forty-four lines, comprising twenty-two elegiac distichs, and the poem is introduced by the rubric: ‘A problem which Archimedes set in epigrammatic form and sent to those interested in these matters in Alexandria, in the letter addressed to Eratosthenes of Cyrene.’ The poem is commonly regarded as spurious, though possibly of Hellenistic date, and based on an actual work on this topic written by Archimedes to Eratosthenes. Certainly the rubric reflects so closely what we know of Archimedes’ procedure (as we have seen several times), and the dispatch of the problem to Eratosthenes is so reasonable, that we must at least regard it as reflecting a genuine work. Moreover, ancient sources, including Cicero, refer to Archimedes’ authorship of the ‘Cattle Problem’, or of an ‘Archimedean Problem’ without further definition, and regarded it as of proverbial complexity. From this it should follow either that the poem is genuine or that it has taken the place of a genuine, possibly prose, work on the same subject. It may be judged more economical to regard the poem as from the pen of Archimedes and, in fact, though positive proof is lacking, there seem good reasons for accepting the attribution.
The few pieces of more recent classical scholarship I’ve found don’t add much, but seem to roughly follow Fraser’s opinion, e.g. Geoffrey C. Benson 2014, Archimedes the Poet: Generic Innovation and Mathematical Fantasy in the Cattle Problem, and other works cited there.