It's not quite true, but nearly.
Batgirl (Barbara Gordon) was created in part from suggestions from the producers of the Adam West TV show, who wanted to add a new element to the series for the third season:
Schwartz stated that he had been asked to develop a new female
character in order to attract a female viewership to the Batman
television series of the 1960s. Executive producer William Dozier
suggested that the new character would be the daughter of Gotham
City's Police Commissioner James Gordon, and that she would adopt the
identity of Batgirl. When Dozier and producer Howie Horowitz saw
rough concept artwork of the new Batgirl by artist Carmine Infantino
during a visit to DC offices, they optioned the character in a bid to
help sell a third season to the ABC television network.
However, her first appearance was in the comics, in the issue dated January 1967 (cover dates were typically the last month the comic was supposed to be on the shelves, so the actual date it shipped was in late 1966).
Meanwhile, Yvonne Craig first appeared as Batgirl in the third season, the first episode, "Enter Batgirl, Exit Penguin" aired September 14th, 1967.
A popular myth among fandom is that the "Barbara Gordon" version of
Batgirl was specifically created for the series by producer William
Dozier, perhaps stemming from an oft-quoted comment by Dozier claiming
credit for the character (he also claimed credit for Aunt Harriet,
despite her comic book debut preceding the TV show by several years).
In fact, the closing credits make it quite clear Batgirl is owned by
and licensed from DC Comics. Comic editor Julius Schwartz had asked
writer Gardner Fox to create a recurring female character for the
comic book to attract some of the female demographic of the TV series.
Dozier saw early artwork of her first story while visiting DC Comics
offices, and collaborated to introduce her into the TV show. She was
first put into the comic, and then later introduced on the TV series.
Indeed, if she HAD appeared on the TV show first, there would have been potential ownership issues, with DC not necessarily being allowed to use her, as Greenwood Productions and 20th Century Fox produced the series and would therefore be able to argue they created and therefore owned any elements that did not originate in the comics (unless their licensing contract specifically granted DC ownership). The desire to synergize between the comics and the show are probably why they suggested the idea to the DC comics offices (so they could use the idea in the comics without red tape, and she would already be covered under the licensing agreement for the show) rather than simply doing it themselves.