In Captain America: Civil War, Sharon and Steve walk back to a hotel after the funeral and before Sam Wilson rushes to tell him about the terrorist attack, Steve asks Sharon if Peggy knew. What was the secret he was asking she knew?
Just before he asks if Peggy knew, he says what he’s asking about:
STEVE: I've been meaning to ask you. When you were spying on me from across the hall...
SHARON: You mean when I was doing my job.
STEVE: Did Peggy know?
So, he’s asking whether Peggy knew that her niece, Sharon, was spying on her ex-colleague and love interest, Steve. (Sharon spied on Steve in Captain America: The Winter Soldier.)
This is addressed in the junior novelisation. Steve was asking whether Peggy Carter knew that her Sharon's assignment was to spy on Steve. Apparently she did not, but note that she was aware that her niece was a S.H.I.E.L.D. agent.
Before she went into her room and he lost his nerve, Steve had one more thing he needed to know. “I’ve been meaning to ask you. When you were spying on me from across the hall…”
“You mean when I was doing my job?” she said, gently correcting him.
Fair enough, Steve thought. “Did Peggy know?”
“She kept so many secrets. I didn’t want her to have one from you.” It was a hard thing for Steve to hear, but he understood. “Thanks for walking me back.”