You can't really make a swinging gate using unmodified Quake; your best bet is to develop for a mod like progs_dump, Alkaline, or Arcane Dimensions.
progs_dump would be the most straightforward to use if you haven't done much Quake mapping before, and it does add a bunch of rotation-related entities as you can see in its manual (there's a "Rotation Entities" section near the end). As well as a bunch of other tools and helpful things you may want.
There's a progs_dump thread with a download link and some discussion over here:
https://www.celephais.net/board/view_thread.php?id=62207
If you're going to develop for a mod like progs_dump, then in general you'll need to figure out how to configure TrenchBroom to target that mod, how to launch Quake to run your mod, etc. I think the progs_dump manual has some good info about how to set things up, also there's an (older) video about that here:
https://youtu.be/_zM2j7RWz2w?si=hbzzUEn0I7UzdRk6
BTW I know on reddit some folks suggested you hit up the Quake Mapping Discord for live help, and that's a good idea for when you run into problems/questions.