He is the third in the line of succession
In the point of view of Daenerys, Robert Baratheon usurped the throne. The last legitime king was Aerys II, and his descendants are the legitimate successors.
Only two descendants seem to be alive:
Jon Snow/Aegon, son of Rhaegar Targaryen and Lyanna Stark, and Daenerys, daughter of Aerys II and Rhaella.
The succession follows male primogeniture law. This means the first son is the heir, then his brothers, and then sisters. If the prince had children, they have a better claim than his siblings.
By these laws,
Jon/Aegon has a better claim than Daenerys, but Daenerys is still the rightful ruler while Jon is still Jon Snow and not Aegon Targaryen.
What about Gendry's claim?
Rhaelle Targaryen, the grandmother of Robert Baratheon, was the sister of Jaehaerys II. If he or all the descendants of Jaehaerys II die, Rhaelle Targaryen or her descendants become the heir to the crown.
Gendry, being the legitimate son of Robert Baratheon, is also the legitimate great-grandson of Rhaelle Targaryen, and therefore the third in succession line.
What does that imply?
As long as Jon is still officially Jon Snow and not Aegon Targaryen, Daenerys is the one with the better claim, and until she gets a child, Gendry is her heir.
However, as the other answers said, he still has a lower claim and is legitimate only thanks to the rightful queen, it wouldn't make much sense for him to claim the throne while she is still alive.