After qualification was confirmed at the weekend, it was a party atmosphere at the Cardiff City Stadium long before kickoff and Chris Coleman's side made sure to finish off with a win in the capital.
© Getty Images
The game was stopped for almost eight minutes in the early stages as medical staff were forced on the pitch to attend to Victor Moreira, who appeared to be knocked out by a challenge from James Chester.
Opportunities were frequent in the first half, but the closest the hosts would come before the break came from an Andorran mistake when Max Llovera got too much on a header back to Pol, who was forced to tip the ball over his crossbar.
© Getty Images
David Edwards headed wide as the influential Bale continued to trouble the visiting defence, before Davies curled just over as Wales piled the pressure on in first-half stoppage time.
The lead finally belonged to Wales five minutes into the second half as Pol saved from an Ashley Williams header, only to see Ramsey react quickest to finish emphatically from close range.
Andorra's attempts to break up play with regular fouls frustrated the Welsh players and supporters, but the host remained dominant throughout and continued to create chances, with Ramsey taking on a couple of defenders before dragging a shot just wide.
In truth, it should have been a much more emphatic triumph for Coleman's side, but they were unable to capitalise on their opportunities, with Sam Vokes heading straight at Pol after Williams had seen his own header parried by the goalkeeper.
It was left to Bale to have the final say late on as he met a Davies cross with a low shot to ensure Wales would not be denied a win at the end of a memorable campaign.
Belgium's victory over Israel earned them top spot in the group, but it did not stop the celebrations as Wales delivered the win in their final test before switching their focus to next summer's tournament.