I don't know about the security gateway in details but security gateway is used whenever two nodes of different network talks to each other. In LTE network, where an eNodeB can be shared between MMEs of different operator i.e. known as MOCN (Multi Operator Core Network). In MOCN, security gateway will be installed between eNodeB and MMEs of different operator.
That is all what I know. Looking for others to add on few more things.