The season two episodes Partners and Co-Pilot established that Ronnie and Vic met after Vic's original partner Joe Clark was fired due to excessive force complaints, but before Mackey met and became partners with Detective Shane Vendrell.
The two have an unspoken bond of loyalty that forms a sharp contrast towards Mackey's dysfunctional relationship with Vendrell. This loyalty is established during season two when Gardocki was disfigured by a pedophile crime boss who Vic had similarly disfigured earlier in the season. When the crime boss is arrested, he threatens to file a police brutality complaint against Mackey if Mackey doesn't force Gardocki to recant a statement which identifies the crime boss as his attacker. Mackey's response was to state that he wouldn't be able to live with himself if he were to force Gardocki to release the man who mutilated his face. In turn, Gardocki's loyalty towards Mackey is shown when he stands by Mackey after the Strike Team disbands at the end of season three.
Despite (or possibly because of) his close friendship with Mackey, Gardocki has been kept in dark regarding some of Mackey's darker plans. Gardocki was not involved in the murder plot against turncoat Strike Team member Detective Terry Crowley. Both Mackey and fellow conspirator Vendrell go out of their way to avoid discussing the crime in front of Gardocki; it is implied that they believe Gardocki will turn against the group if he finds out what the two men had done.
However, in spite of their fears, in the wake of Internal Affairs publicizing the belief that Mackey may have murdered Crowley, Gardocki has continued to fully support Mackey during the investigation. In season six, when Mackey reveals to Gardocki in that he did kill Crowley, Gardocki says that he wished Mackey had told him the truth so he "could have looked out for you better".