Both players were surprise picks for the contest with Bautista Agut's father having passed away three days previously, while the 19-year-old Canadian phenomenon subbed in for Vasek Pospisil to make his first appearance of the week.
The first set was finely balanced throughout with neither player able to hold the ascendancy and make a swift impact in the crucial opener, which was preceded by a performance from Shakira.
But it was the Spaniard who seized the moment more successfully as he edged a 54-minute opening set and took the tie-break 7-3, much to the delight of the home fans in Madrid.
Auger-Aliassime tied up badly at the start of the second set to immediately hand his opponent the initiative with a break of serve, but responded to level up as Bautista Agut wavered.
Spain's Roberto Bautista Agut celebrate winning a point against to Canada's Felix Auger-Aliassime during the final singles tennis match between Canada and Spain at the Davis Cup Madrid Finals 2019 in Madrid
Image credit: Getty Images
The young Canadian needed a big service game at 3-2 down, but again struggled to settle and the 31-year-old from Castellon de la Plana capitalised to take control once more.
Bautista Agut held his composure very impressively to serve out for the match from 5-3 up in the second set and the world number nine delivered when it mattered most for his country.
It was a hugely significant and emotional victory for the veteran, with the stage now set for the player of the tournament.
World number one Rafael Nadal now has the opportunity to clinch Spain's first Davis Cup triumph since 2011 if he overcomes Denis Shapovalov in the second singles clash.