There are four main things that affect how an empire sees you in terms of "closeness".
1) How dependent their economy is on you.
Basically if a large % of their economy comes from trade with you, they will like you more and more as time goes on. Therefore its good to have a lot of trade routes with a race that you want to be allies with.
2) Morality
If they are of the same morality as you, they are a lot more likely to get to "close" relations. If you are both "good", then this is usually pretty easy. Evil races are a little less likely to buddy up.
3) What have done for me lately?
What I mean by this is bribes. You can give an AI a gift in the form of money, ships, IP votes, etc. A gift every 3 or 4 turns can quickly raise your relations level.
4) Military might.
If you be the king of the hill so to speak, everybody is much more likely to love you. They will become "groupies".
Hope this helps