All of the above. Ultimately the network is to blame. They wouldn't give Roddenberry a decent time slot, so he walked. They cut the budget and brought in the hack Frieberger. That sealed the 3rd seasons fate.
That's not exactly true.
Inside Star Trek explains what happened. First off, Herb Solow, the Desilu exec who'd worked closely with Roddenberry from the beginning of ST, resigned not long after Gulf + Western bought out the studio and merged it with Paramount. Gene L. Coon and D. C. Fontana went off to pursue their own projects. Story editor John Meredyth Lucas wasn't asked back for the third season. Roddenberry did stay on as executive producer, but because he was certain the show would be cancelled, he shifted his attention to developing new series ideas and no longer rewrote any of the series' scripts. It was actually Roddenberry who picked Fred Freiberger as the new producer, choosing him over Bob Justman, the associate producer who'd effectively become the de facto producer by that point.
So the problem isn't just Freiberger. The problem is that practically everybody who made
Star Trek what it was in the first two seasons -- Roddenberry, Solow, Coon, Fontana, Lucas -- was either gone or effectively uninvolved when season 3 came around, and Justman was put in a subordinate position. So Freiberger and his story editor Arthur H. Singer (who had actually been Justman's recommendation for that role) were dropped into the middle of an ongoing series and had very little help getting a handle on its style and approach.
So I don't think there's any simple blame that can be placed here. There were a lot of
reasons why it happened; it was essentially a perfect storm of circumstances that caused the show to lose most of its key creative minds after season 2. But how many of those individual decisions are really worthy of "blame," in the sense of being bad or ill-intentioned choices? Solow left because he felt the G+W execs didn't understand show business. Was that wrong of him? I don't think so. And was it wrong for Coon and Fontana to want to advance their careers and develop their own projects? I don't think so. Lucas wanted to stay on as story editor, but it's unclear why he wasn't asked back. Was it even wrong for NBC to move
Star Trek to a bad time slot? Maybe bad for the show, but they had to consider their entire lineup, find the balance of shows and slots that would work best overall. ST was not one of their strongest performers ratings-wise, so it was a logical decision to put stronger shows in the good time slots. You can't even blame them for bringing in a new producer rather than promoting Justman, because Justman didn't have enough experience on the creative side, at least on paper.
Assuming
Inside Star Trek's account is reasonably accurate, the only person who seems to have made any questionable decisions here is Roddenberry himself. He could've made more of an effort to supervise Freiberger's work and help him learn the ropes. He could've asked Lucas to stay on as story editor. And even with cancellation likely, he could've chosen to remain actively engaged with the show and done all he could to give it a strong finish, rather than just giving up and ignoring his responsibilities as Executive Producer. But given the way the business works, maybe he can't be entirely blamed for focusing his efforts on securing his next job before his current one ended (even though he never got another successful series-producing gig until TNG).
EDIT: And I see
DakotaSmith has eloquently argued Roddenberry's case up above (that's what I get for trying to post and research while eating lunch). The burnout factor is definitely worth taking into account in his defense. Probably if more of the staff had stuck around, GR could've handed the showrunner gig over to Gene Coon and the show would've stayed terrific. (Fontana did a good job as showrunner on TAS, but I'm not sure they would've let a woman run a primetime show in 1968.) But practically everybody was gone by then, and GR couldn't handle it on his own.
So yeah, I don't think any one person or factor deserves blame here. It's just a bunch of separate, mostly understandable decisions that converged in the worst possible way.