The Italian lost touch with his main title rivals 2-km from the summit of the Sallent de Gallego climb at the end of Stage 16 while second-placed American Chris Horner gained 22 seconds on the race leader.
Tuesday is a rest day and Nibali will take a slender 28- second advantage over Horner into Stage 17, with third-placed Spaniard Alejandro Valverde having also closed the gap to one minute 14 seconds.
Nibali said that being in front for 11 of the last 16 days was starting to take its toll.
"Having this jersey is getting very wearisome, with all the media responsibilities and a lot of time spent travelling between stages," the Astana rider told reporters.
"This was a very difficult finish, very windy at the top of the climb. I'm not really doubting my strength, I'm still optimistic, but the rest day will be very important for me tomorrow."
Horner said overall victory was still in the Italian's hands.
"Anything can happen, it all depends on Nibali," the American explained. "If he weakens just a little then everything becomes possible."
Horner, 41, became the oldest-ever Grand Tour leader when he held first position for two days in the first week.
On Monday, a rider 20 years his junior captured his second stage win of the race.
Part of a break by 17 riders, Argos rider Barguil made a solo move 10-km from the finish before being caught by Rigoberto Uran of Colombia.
Team Sky's Uran attempted to overpower his rival but the Frenchman won by centimetres. Pole Bartosz Huzarksi was in third spot, three seconds back.
"I wasn't feeling well earlier in the stage and I had problems when I got in yesterday's breakaway so I decided not to do too much early on and go for a late attack," said Barguil who also won Stage 13 to Casteldefels.
"I already had one stage win in the bag so I decided to stay calm when Uran reached me and hope it would work out in the sprint."
Asked how he kept his cool against more experienced riders, Barguil replied: "Whenever I'm in good form I try too hard. I'm always scared of doing too much so I just keep on telling myself to see it all as a game".
Stage 16 Result
Warren Barguil (Fra) Team Argos-Shimano
Rigoberto Uran Uran (Col) Sky Procycling
Bartosz Huzarski (Pol) Team NetApp-Endura
Dominik Nerz (Ger) BMC Racing Team
José Herrada Lopez (Spa) Movistar Team
Mikael Cherel (Fra) AG2R La Mondiale
Maciej Paterski (Pol) Cannondale Pro Cycling
Andre Fernando S. Martins Cardoso (Por) Caja Rural
Amets Txurruka (Spa) Caja Rural
Chris Anker Sörensen (Den) Team Saxo-Tinkoff
Vincenzo Nibali (Ita) Astana Pro Team
Christopher Horner (USA) RadioShack Leopard
Alejandro Valverde Belmonte (Spa) Movistar Team
Joaquim Rodriguez Oliver (Spa) Katusha
Domenico Pozzovivo (Ita) AG2R La Mondiale
Nicolas Roche (Irl) Team Saxo-Tinkoff
Thibaut Pinot (Fra) FDJ
Leopold Konig (Cze) NetApp-Endura
Samuel Sanchez Gonzalez (Spa) Euskaltel-Euskadi
Tanel Kangert (Est) Astana Pro Team