The day Edmundo González was plucked from obscurity and chosen to take on South America’s longest ruling authoritarian leader, technicians were busy making sure his home was not wiretapped.

“This was not in our plans,” his wife, Mercedes López de González, said in an interview that day in April in their apartment in Caracas, the capital of Venezuela.

Not long ago, Mr. González, 74, was a retired diplomat and grandfather of four with no political aspirations. He kept busy writing academic papers, speaking at conferences and taking his grandchildren to haircuts and music lessons. Few in his native Venezuela knew his name.

Now, many Venezuelans have placed their hopes in him to end years of repressive rule as he challenges President Nicolás Maduro, who has held power since 2013, in elections scheduled in late July.

Mr. González is suddenly back to having a full-time job.

“Twice a day I have to wipe the phone,” he said in a brief interview. “I delete almost 150 messages. I go to bed at 1 a.m., and by 4 a.m., I’m back on my feet and working again. I never imagined this.”

After years of rigged elections and political persecution, people in Venezuela yearning for a return to democracy have learned to expect disappointment.