So here's the thing. Throughout NCIS, we see the deterioration of Tony's relationships with the rest of the team, especially Gibbs.
When season 1 started, Tony and Gibbs were a partnership. Gibbs had seniority, but he and Tony worked together well. They were a team, just the two of them, and they functioned as one. Tony had a measure of Gibbs' respect, and Gibbs trusted him to know how to do his job, to get things done. While Gibbs did rib him and he did smack him, he knew that Tony knew what he was doing, and he respected that.
When Kate joined the team, Gibbs saw what Tony was doing, how he challenged her in order to bring out the best in her, how he poked fun at her so that she would push back. Gibbs knew that Tony wasn't trying to create a hostile work environment with Kate. He saw that he was working to make her the best agent she could be, helping shape her and show her the way. Tony figured out what worked best with Kate and Gibbs let him run with it.
It was the same thing with McGee. McGee needed to prove himself. He needed to show that he was just as good as Tony, that he could be an agent like Tony, who made Gibbs proud. Gibbs saw the way Tony treated McGee like a little brother, the way Tony was constantly pushing him so that McGee would go one step further, so that he wouldn't be timid and unsure of himself. Gibbs recognized that Tony was doing what he did best- using his people skills to figure out what other people needed.
Then Kate died and Ziva joined the team. From the get-go, Tony and Ziva had an antagonistic relationship. There was tension between them. Gibbs saw it. He ignored it. He didn't respect Tony's opinion on Ziva because he'd bonded with her over Ari's death, over her actions. He didn't see that Tony raised legitimate concerns. He didn't want to acknowledge that he had a blind spot. And as Tony and Ziva continued to have tension, spanning years, Gibbs started losing respect for Tony.
I can't say Gibbs' reasoning for it, but the more he lost respect for Tony, the more Tony lashed out, fought back. It wasn't the Gibbs and Tony show anymore. It wasn't teamwork makes the dream work. Tony was antagonistic with Gibbs when the man gave orders he didn't agree with. He fought back. He talked back. The more respect Gibbs lost for him, the more Tony lashed out, the more Gibbs lashed out too. By the time Dead Air came around, Tony didn't trust Gibbs to have his back. He didn't trust his team lead to be a team lead. And Gibbs didn't trust Tony as his second in command.
With the building of his relationship with Ziva, Gibbs started to see Tony through her lens. He lost sight of the investigator that Tony was. He saw the playboy, the man who didn't tell the truth half the time. He lost sight of who Tony was. He saw the masks and he couldn't see through them anymore. And the masks made up a man that Gibbs didn't much like.
As Gibbs and Tony drifted apart, there was a rift in the team, one that never recovered. The team wasn't functioning cohesively on every case. There was tension there that was never addressed. Gibbs' loss of respect for Tony cost the team dearly.