Neville was born on the 30th of July, the day before Harry, so he too was born 'as the seventh month dies'. His parents, who were both famous Aurors, had 'thrice defied' Voldemort, just as Lily and James had. Voldemort was therefore presented with the choice of two baby boys to whom the prophecy might apply. However, he did not entirely realise what the implications of attacking them might be, because he had not heard the entire prophecy. As Dumbledore says:
'He [the eavesdropper] only heard the beginning, the part foretelling the birth of a boy in July to parents who had thrice defied Voldemort. Consequently, he could not warn his master that to attack you would be to risk transferring power to you.'
In effect, the prophecy gave Voldemort the choice of two candidates for his possible nemesis. In choosing which boy to murder, he was also (without realising it) choosing which boy to anoint as the Chosen One – to give him tools no other wizard possessed – the scar and the ability it conferred, a magical window into Voldemort's mind.
So what would have happened if Voldemort had decided that the pure-blood, not the half-blood, was the bigger threat? What would have happened if he had attacked Neville instead? Harry wonders this during the course of 'Half-Blood Prince' and concludes, rightly, that the answer hinges on whether or not one of Neville's parents would have been able, or prepared, to die for their son in the way that Lily died for Harry. If they hadn't, Neville would have been killed outright. Had Frank or Alice thrown themselves in front of Neville, however, the killing curse would have rebounded just as it did in Harry's case, and Neville would have been the one who survived with the lightning scar. What would this have meant? Would a Neville bearing the lightning scar have been as successful at evading Voldemort as Harry has been? Would Neville have had the qualities that have enabled Harry to remain strong and sane throughout all of his many ordeals? Although Dumbledore does not say as much, he does not believe so: he believes Voldemort did indeed choose the boy most likely to be able to topple him, for Harry's survival has not depended wholly or even mainly upon his scar.