The incident happened when he paid his respects to the statue of Maharaja Agrasen in the Favvara area of the Taj city.
As Mr Gandhi bowed to garland the statue, an electric wire, apparently used to feed the shops in the market, touched his head, forcing him to move back immediately. An SPG functionary, standing next to him, held him, fearing that he might lose balance, a witness told IANS.
As State Congress chief Raj Babbar, who was with Mr Gandhi, asked him if he was okay, Mr Gandhi responded in jest: "Aapne to mujhe current lagwa di (You got me electrocuted)".
Earlier, last week a young man threw a shoe at him in Sitapur. The footwear missed Mr Gandhi narrowly but sent jitters through the security agencies.