The 25-year-old Spaniard was part of the early breakaway but broke free from the large group on the sixth of nine categorised climbs, along with team-mate Rein Taaramae, Belgian Tim Wellens (Lotto-Soudal) and American Tom Danielson (Cannondale).
Landa was able to drop his companions on the final kilometre to win the stage ahead of Wellens and Danielson.
Finishing 56 seconds down on the winner, race leader Sergio Henao (Sky) arrived at the finish neck-and-neck with Spain's Katusha rider Joaquim Rodriguez.
In the overall standings, Henao and Rodriguez are level on exactly the same time with just Saturday's 18.3km time-trial to race.
"I don't rule out anyone for the overall victory," said Henao at the finish line.
"The time-trials are tough and we all have our chances."
Colombia's Movistar rider Nairo Quintana had started the day on the same time as Henao and Rodriguez, but lost 12 seconds, allowing Orica-GreenEDGE's Simon Yates into third, at 7sec.
"I know that winning will be complicated for me even if the time gaps are small," said Quintana.
"I'll be fighting to finish on the podium."
In 2013, there was a similar scenario when Henao went into the final day as leader but was beaten by Quintana, who is a stronger rider in the race-against-the-clock, and came second on the day to pip his compatriot to victory.
"I don't have a sufficient enough lead on Nairo (Quintana) with his qualities," added Henao.
The route of Saturday's final 18.3km time trial rides around Aia and finishes with a difficult summit finish.
Stage 5: 155.5km, Eibar - Aia
1 Mikel Landa Meana (ESP) Astana 4hr 06min 01sec
2 Tim Wellens (BEL) Lotto Soudal 0:00:03
3 Thomas Danielson (USA) Cannondale-Garmin 0:00:16
4 Rein Taaramae (EST) Astana 0:00:28
5 Tony Gallopin (FRA) Lotto Soudal 0:00:38
6 Simon Yates (GBR) Orica-GreenEDGE 0:00:53
7 Sergio Luis Henao (COL) Sky 0:00:56
8 Joaquim Rodriguez (ESP) Katusha
9 Tom Jelte Slagter (NED) Cannondale-Garmin 0:01:05
10 Alexis Vuillermoz (FRA) AG2R La Mondiale 0:01:06
1 Sergio Luis Henao (COL) Sky 21hr 20min 48sec
2 Joaquim Rodriguez (ESP) Katusha
3 Simon Yates (GBR) Orica-GreenEDGE 0:00:07
4 Nairo Quintana (COL) Movistar 0:00:12
5 Michele Scarponi (ITA) Astana 0:00:22
6 Simon Spilak (SLO) Katusha
7 Ilnur Zakarin (RUS) Katusha 0:00:28
8 Ion Izagirre (ESP) Movistar
9 Tejay Van Garderen (USA) BMC Racing 0:00:36
10 Thibaut Pinot (FRA) FDJ.fr