In The Great Gatsby, what happens when Gatsby encounters Tom?

I assume you are referring to their first meeting in Chapter 6. Let us remember that this meeting comes after Nick has organised a meeting between Gatsby and Daisy earlier. In Chapter 6, the Buchanans are invited to one of Gatbsy's parties and Tom and Gatbsy meet for the first time. We are told that Gatbsy is "profoundly affected by the fact that Tom was there" and then goes on to "aggressively" say to Tom,...

I assume you are referring to their first meeting in Chapter 6. Let us remember that this meeting comes after Nick has organised a meeting between Gatsby and Daisy earlier. In Chapter 6, the Buchanans are invited to one of Gatbsy's parties and Tom and Gatbsy meet for the first time. We are told that Gatbsy is "profoundly affected by the fact that Tom was there" and then goes on to "aggressively" say to Tom, "I know your wife." In response to this later, Tom says:

"I wonder where in the devil he met Daisy. By God, I may be old-fashioned in my ideas, but women run around too much these days to suit me. They meet all kinds of crazy fish."

It is clear therefore that there is animosity between Gatsby and Tom, even though nothing is openly said or admitted between them. The tension is obviously there, as, on some level at least, Tom suspects that something has gone on in the past between Gatsby and Daisy. Thus the stage is set for their later argument about who loves Daisy.