As I understood it, the requirements for a CS to gift a unique unit are:
1.) The CS is allowed to build the specific unit (highlight over the "militaristic" text to see which UU it can spawn).
2.) The CS has access to the technology that unlocks that unit. I don't think it matters which techs the player has.
3.) The CS does not have access to the tech that obsoletes that unit. Again, I don't think it matters which techs the player has.
4.) The CS has access to the requisite strategic resource (if applicable).
As I understand it, CSs have their own tech tree, and they unlock techs based on either the most advanced civ(s) that they've met, the civ that they are allied with, or some average tech level of the civ(s) they've met. I could be wrong though.
I'm pretty sure that I've seen CSs gift me units that I don't have the tech for, and I'm also pretty sure that I've seen CSs gift me a unit that is already obsolete.