Although the two leaders have never openly positioned themselves against each other, they now seem to have trouble concealing the discord between them over the role of the judiciary in the high-profile graft probe that poses the most serious challenge to Erdogan's 11 years in power.
"It would not be a surprise if Gul, who is in favour of a stance that prevents the row from becoming more 'bloody', threw more weight behind the issue," said Oral Calislar, a columnist for the liberal daily Radikal.
Erdogan, grappling with a damaging graft inquiry that targeted cabinet ministers and top businessmen, has been in a battle with the judiciary since the corruption scandal broke out last month.
The Turkish strongman has branded the probe as a "smear campaign" to undermine Turkey's ambitions to become a major political and economic power, and last weekend he called it a "judicial coup".
Erdogan repeatedly lashed out at Muammer Akkas, a Turkish prosecutor who said he had been prevented from expanding the corruption investigation and described a new police regulation obliging those carrying out probes to inform superiors as "unconstitutional."
Although the regulation was later abolished, the government sought to further clip the wings of the judiciary by proposing legal amendments which will limit the authority of the Higher Board of Judges and Prosecutors (HSYK), the country's top judicial regulatory body.
'Independence and impartiality'
Amid this fray Gul, who had stayed mum on the issue for a long time, broke his silence and came to the defence of the judiciary. He countered Erdogan by saying that the judiciary should be free from government interference.
"The legislative and executive powers are in a way accountable through elections but the judicial system is in a different position. For them, independence and impartiality is much more important," Gul said on television last week.
The tensions in the Turkish leadership come ahead of crucial local elections in March and presidential poll in August.
Erdogan, who has won three election victories in a row since 2002, is not allowed to run as prime minister for a fourth term because of party regulations. He is believed to have set his sights on the presidency if the constitution is changed to give the post US-style executive powers.
Nihat Ali Ozcan of the private TOBB university in Ankara says there is a personal competition between Erdogan and Gul and that the graft crisis could work more to Gul's advantage.
"This new situation has become an opportunity for Gul," he said. "He can take real advantage if the problems that threaten Erdogan get worse."
But Erdogan's supposed presidential ambition has also raised speculation that Gul could become the prime minister. The president declined to comment on the matter and said: "It is too early for me to say anything on this."
Calislar observed that while the corruption scandal "has made it necessary to question everything, I do not believe that the trend has changed."
"The most likely scenario is: If Erdogan opts for the presidency and preserves the support he needs to achieve this, it seems that the prime minister and the party leader will be Gul," he said.
Gul and Erdogan were co-founders of the Islamic-rooted Justice and Development Party (AKP) in 2001.
They have long been political allies and have weathered several storms including attempts to ban the AKP and a military tutelage.
But signs of discord between them emerged during a government crackdown in June on protesters opposed to plans to develop Istanbul's Gezi park.
The two leaders have since carefully avoided any public confrontation but have been demonstrating different styles in the crisis -- Erdogan is seen as authoritarian while Gul has appeared as a unifier.
Gul is also seen as closer to Fethullah Gulen, an exiled Turkish cleric living in the United States whose movement wields considerable influence in the police and judiciary. Gulen is accused by the government of instigating the bribery probe.
"We can say that Gul is at a critical point considering where we are in the feud between the government and the Gulen movement. He can play a role that can have an effect on the course of events," Calislar said.