Your partner needs to have researched the alliance tech as well. I believe it would work if you gave it to them as a gift (and then waited a turn). IMO, the whole "research treaties" thing is quite silly, but de rigueur for this type of game it seems. At the very least it should be possible to offer an alliance that you have researched, whether or not the counterparty has done so.
I believe the idea is to make gateways so that more powerful alliances are the reward for investing in the diplomacy tree. It feels very artificial and forced.