A lot of this story is correct, but a lot of it isn't.
In case you couldn't figure it out, Desilu was Desi Arnaz and Lucille Ball's production company, which they ran together. Arnaz handled the business side and Ball handled the creative side. After Ball divorced Arnaz and then remarried, Arnaz couldn't handle working with her anymore. Ball bought him out, but didn't really want to run a company. However, the studio wasn't doing so well at the time and she didn't want the staff to loose their jobs. So, she used 'I Love Lucy' spin-off pilot advance money to pay for shows like 'Star Trek' and 'Mission: Impossible'. Once the studio was doing well enough to be sold for a reasonable price and the staff would keep their jobs, she sold Desilu.
NBC originally aired 'Star Trek', not CBS. NBC were not inclined to cancel 'Star Trek', because it did well in particular demographics popular with advertisers. Roddenberry started the cancelation rumor and seeded the letter writing campaign. NBC had nothing to do with Gulf + Western's purchase of Desilu; Gulf Western owned Paramount Studios and renamed Desilu as Paramount Television.
Years later, Viacom bought Paramount. Years after that, Viacom bought CBS. A few years after that, Viacom split into a TV company (now called CBS) and a movie company (now called Paramount). The TV company owns 'Star Trek' and JJ Trek is the movie company licensing Trek from the TV company. And CBS is the current instantiation of the company formerly known as Desilu.