Like the other legendary weapons in Assassin's Creed Valhalla: Wrath of the Druids, you'll need to complete nearly the whole storyline to obtain the legendary spear.
The legendary weapon will be given to you by Deirdre after completing the "Amber Sun" side quest.
Defeat the Children of Danu
First of all, you will have to hunt down the Children of Danu. It's a tedious task, but the lore around these members brings a bit of a unique twist, which isn't too bad.
Here's a guide to the location of all of Children of Danu.
Once you've collected all the pieces of Ambers from the Children of Danu, you'll need to return to Dreirdre so she can prepare a potion from the amber fragments. You can then trigger the boss fight.
Defeat Balor
The boss is easy enough, but keep in mind that he has two phases. Avoid his AoE attacks and his light beams, and with a little dodging, you will be able to kill him.
The Legendary spear Gae Bolg
This spear can be used with a second weapon if you took the path that allows you to equip two two-handed weapons. It creates a lightning strike that shocks the enemy after 3 consecutive hits, inflicting stun damage.