What is it called when an argument says that because things are alike in one way, they are alike in others?

The argument you are referring to is known as an analogy or analogical reasoning.