Yes, I recall reading that passage in Gulliver's travels (at about 12/13) but likely did not realize the significance, being aware of the "moons" of Mars but not their date of discovery. Swift was pretty close on the orbital period of Phobos but not that good on Diemos.
Conspiracy theories: I've read that these moons were not natural but were constructed by Martians. Seems more likely they were corralled and dragged into orbit. Don't think he deciphered Martian records on Earth but simply grokked it.