A multifunctional G-PyB/KCl hydrogel showed outstanding self-healability, high conductivity, and rapid room-temperature phase-selective gelation capacity, and was developed as an electrochemical aptamer sensing platform for the ultrasensitive detection of alpha-fetoprotein.