Barbara Gordon as Batgirl was created in 1967. She was added to the 3rd season of the 1960s TV show to give a character for female viewers to identify with and try to increase female viewership, and was a love-interest for Bruce Wayne from the very start - so her relationship with Batman predates any relationship with Robin/Nightwing.
Of course, the portrayal at the time was Bruce Wayne being mid-to-late 30s, Barbara Gordon being late-20s / early-30s, and Dick Grayson being about 18. These days, both Bruce Wayne and Dick Grayson are portrayed as being older (to "make room" for all the later Robins, and to allow Dick to become Nightwing) while Barbara Gordon's age has stayed much the same - most likely so that Commissioner Gordon, her father, won't have already retired!
(Of course, Barbara Gordon was the second Batgirl - the first, Betty Kane, was Robin's love-interest and the niece of Kathy Kane, Batwoman and love-interest of Batman)