Geckos are able to climb walls due to specialized toe pads that have microscopic hair-like structures called setae. These setae create a molecular attraction known as Van der Waals forces that allow geckos to adhere to surfaces and climb vertically. This unique adaptation enables geckos to climb walls and surfaces with ease.