Hit it off (with someone)

To have a good relationship with someone from the first time that you meet that person – it can be used for any two people who meet and have a good relationship.

I hit it off with a woman in my photography class and we have been dating for several months now.