Two boys were born as the seventh month died. Two boys were equally at risk from Lord Voldemort, but he only targeted one. Harry and Neville shared a possible destiny and so much more…
Harry and Neville in the Room of Requirement from the Order of the Phoenix

Their childhoods were overshadowed by Muggles

For Harry, it was the endless tedium and cruelty of the Dursleys. With Neville, it was the constant pressure to whip up a bit of magic to convince his family of his abilities.

‘Well, my gran brought me up and she’s a witch,’ said Neville, ‘but the family thought I was all Muggle for ages. My great-uncle Algie kept trying to catch me off my guard and force some magic out of me – he pushed me off the end of Blackpool pier once, I nearly drowned – but nothing happened until I was eight…’
Harry Potter and the Philosopher’s Stone

Snape was equally vile to them both

Harry ‘the Chosen One’ Potter and Neville both get stick from Snape.

‘Idiot boy!’ snarled Snape, clearing the spilled potion away with one wave of his wand.
‘I suppose you added the porcupine quills before taking the cauldron off the fire?’ Neville whimpered as boils started to pop up all over his nose.
Harry Potter and the Philosopher’s Stone

They both felt like they didn’t belong in Gryffindor

In the beginning, Neville battled self-doubt as regularly as Harry, and after Malfoy hit him with a Leg-Locker Curse he was close to tears, believing that the Sorting Hat had made a mistake. Not too long afterwards, Harry became convinced that the Sorting Hat had made the wrong choice with him too when he found he could speak Parseltongue, traditionally a Slytherin talent.

‘There’s no need to tell me I’m not brave enough to be in Gryffindor, Malfoy’s already done that,’ Neville choked.
Harry Potter and the Philosopher’s Stone
  ‘It only put me in Gryffindor,’ said Harry in a defeated voice, ‘because I asked not to go in Slytherin ...’
‘Exactly,’ said Dumbledore, beaming once more.
Harry Potter and the Chamber of Secrets

They (briefly) shared a name

Harry wasn’t keen on Stan Shunpike knowing his true identity, so he nicked the first one he could think of – isn’t it interesting who he chose?

‘Woss your name?’ Stan persisted.
‘Neville Longbottom,’ said Harry, saying the first name that came into his head. ‘So – so this bus,’ he went on quickly, hoping to distract Stan, ‘did you say it goes anywhere?’
Harry Potter and the Prisoner of Azkaban

They were both endlessly brave

While Neville didn’t often find himself in as many deadly situations as Harry, he showed true bravery and spirit in other ways. Such as when he was the first to attack the Boggart in Professor Lupin’s class.

They all retreated, backing against the walls, leaving Neville alone beside the wardrobe. He looked pale and frightened, but he had pushed up the sleeves of his robes and was holding his wand ready.
Harry Potter and the Prisoner of Azkaban

They shared a tragic loss

Harry’s parents were murdered by Voldemort, and Neville’s were tortured into insanity by Bellatrix Lestrange – a fate just as bad, if not worse.

‘No,’ said Dumbledore, his voice full of a bitterness Harry had never heard there before, ‘they are insane. They are both in St Mungo’s Hospital for Magical Maladies and Injuries. I believe Neville visits them, with his grandmother, during the holidays. They do not recognise him.’
Harry sat there, horror-struck. He had never known … never, in four years, bothered to find out...
Harry Potter and the Goblet of Fire

They could both see Thestrals

Harry and Neville had both seen death and, as a result, could see the Thestrals, unlike many of the others at the school.

‘Yeah … yeah, I knew you’d be able ter, Harry,’ he said seriously. ‘An’ you too, Neville, eh? An’ –’
‘Excuse me,’ said Malfoy in a sneering voice, ‘but what exactly are we supposed to be seeing?’
Harry Potter and the Order of the Phoenix

They were both selfless

Neville may have had a broken nose, but that didn’t stop him from staying with Harry and helping him save Hermione in the battle for the prophecy. In fact, it was Neville and Harry who dominated the fight.

‘Well, I’b going do find dem wid you,’ said Neville firmly. ‘But Hermione –’
‘We’ll dake her wid us,’ said Neville firmly. ‘I’ll carry her – you’re bedder at fighding dem dan I ab –’
He stood up and seized one of Hermione’s arms, glaring at Harry, who hesitated, then grabbed the other and helped hoist Hermione’s limp form over Neville’s shoulders.
Harry Potter and the Order of the Phoenix

They both appeared in the prophecy

Of course, the thing that truly tied these two heroes was a prophecy made by Sybill Trelawney. So close was her description of the wizard who would one day vanquish Lord Voldemort, that it could've been either Harry or Neville. In fact, we explored what would happen if Voldemort had picked the other target..

Dumbledore took a deep breath. ‘The odd thing, Harry,’ he said softly, ‘is that it may not have meant you at all. Sybill’s prophecy could have applied to two wizard boys, both born at the end of July that year, both of whom had parents in the Order of the Phoenix, both sets of parents having narrowly escaped Voldemort three times. One, of course, was you. The other was Neville Longbottom.’
Harry Potter and the Order of the Phoenix

They both spent an inordinate amount of time in the hospital wing

Madam Hooch was bending over Neville, her face as white as his. ‘Broken wrist,’ Harry heard her mutter. ‘Come on, boy – it’s all right, up you get.’ She turned to the rest of the class. ‘None of you is to move while I take this boy to the hospital wing! You leave those brooms where they are or you’ll be out of Hogwarts before you can say “Quidditch”. Come on, dear.’
Harry Potter and the Philosopher’s Stone

 

Harry swallowed and looked around him. He realised he must be in the hospital wing.
Harry Potter and the Philosopher’s Stone

 

Harry’s eyes snapped open. He was lying in the hospital wing. The Gryffindor Quidditch team, spattered with mud from head to foot, was gathered around his bed.
Harry Potter and the Prisoner of Azkaban

 

They had reached the hospital wing: pushing open the doors, Harry saw Neville lying, apparently asleep, in a bed near the door.
Harry Potter and the Half Blood Prince

They were both true leaders

The next moment, he, Ron and Hermione were engulfed, hugged, pounded on the back, their hair ruffled, their hands shaken, by what seemed to be more than twenty people: they might just have won a Quidditch final.
‘OK, OK, calm down!’ Neville called, and as the crowd backed away, Harry was able to take in their surroundings.
Harry Potter and the Deathly Hallows

And maybe this explained why Neville was Harry’s first choice in the battle for Horcruxes.

Dumbledore had died knowing that three people still knew about the Horcruxes; now Neville would take Harry’s place: there would still be three in the secret.
Harry Potter and the Deathly Hallows

Hermione Ron and Neville at the Department of Mysteries
Neville defies Lord Voldemort and holds the sword of Gryffindor in the aftermath of the Battle at Hogwarts.
Harry Potter to Fantastic Beasts