Joe Gargery is, of course, Pip's brother-in-law because he is married to Pip's sister. He is also, officially, Pip's master because Pip is apprenticed to him.
On an unofficial level, their relationship is not really a master-apprentice relationship or an older relative-younder relative one. Joe is not really "above" Pip. Instead, they're sort of equal because of Mrs. Joe -- Pip's sister. She is so harsh to both of them -- threatening them with the "Tickler," making them drink tar-water -- that they are more like brothers or friends.
They are both so intimidated and dominated by her that they are more like equals than their "official" relationship would suggest they should be.