Austen introduces the Gardiners in Chapter 25, they visit Longbourn and contrast the vulgarity of Mr and Mrs Bennett:
"Mr. Gardiner was a sensible, gentlemanlike man"
"Mrs Gardiner...was an amiable, intelligent, elegant woman"
Lizzy's "tour" with the Gardiners is important as it provides an opportunity for her and Darcy to review their first impressions.
Firstly, it moves Lizzy away from the negative influence of her immediate family and allows Darcy to see her in a more positive light, with "sensible" members of her family. This is important as one of the problems he mentioned in his first proposal were "the inferiority of your connexions".
Darcy's civility to the Gardiners is not surprising, he is a well-bred gentleman, however, one additional reason for this civil behaviour is due to his changing feelings for Lizzy. This is prompted in part by Lizzy's initial rejection and accusation that he had not behaved in "a gentlemanlike manner". This is his opportunity to show her his true nature.
Secondly, Lizzy is able to see Darcy's softer side, with his sister in his own home; and hear the housekeeper's view of Darcy. She continues to re-evaluate her original impression of him, which started with the letter he wrote to her in Chapter 35.
The Gardiners, by enabling Lizzy and Darcy to see each other away from the toxic influence of their initial meeting, are vital for the couple's eventual mutual understanding.