While Leonard had always been in love with Penny, it took her a while to notice him. Even after they first started dating, there was a lot of apprehension in their relationship that they ended up separating. In The Big Bang Theory season 5, episode 23, "The Launch Acceleration," however, Penny and Leonard have already dating for quite a while, that she started thinking about taking things to the next level, which resulted in them getting intimate. The Big Bang Theory actually did this proposal quite creatively, as viewers were only shown the aftermath of it.
Apparently, in the heat of the moment, Leonard got carried away and proposed while they were in bed. This surprised Penny, and not in a good way, causing her to storm out of the bedroom. Leonard profusely apologized and asked for a second chance, but Penny was quite irked about it, and understandably so, considering that they were working hard to take things slow in rebuilding their relationship.
In The Big Bang Theory season 6, episode 16, "The Tangible Affection Proof," Leonard and Penny joined Howard and Bernadette for a double date during Valentine's Day dinner.
This was arguably one of the worst moments for Penny and Leonard because it highlighted just how imbalanced their relationship was (at least at this point). Penny was getting fixated on her ex getting engaged without knowing that she was insulting her current boyfriend.
True to their pact, Leonard started becoming more careful about proposing, knowing that doing so freaked out her girlfriend. However, after Penny's career hit a major snag, she became convinced that the best way to fix her life was to get married.
Just because Leonard said no didn't mean that he didn't want Penny. However, it would have been a disaster if said yes to his drunken girlfriend's proposal. Perhaps Penny would have eventually taken it back once he sobered up. In any case, she eventually realized the error of her ways and Leonard's decision the next day.
Just a few episodes after Penny's botched proposal, the pair once again had an engagement conversation, oddly during Professor Proton's funeral in The Big Bang Theory season 7, episode 22, "The Proton Transmogrification." At this point, both of them were already fairly comfortable in their relationship, to the point that they could even talk about deeper topics such as life and death.
Professor Proton's death was one of the saddest moments in The Big Bang Theory, but the pair's conversation about botched engagements brought levity to the outing. Ultimately, Penny proposed again, albeit in the most nonchalant way, after Leonard pointed out that she had turned him down twice, while he only had to decline her once. The whole scene was hilarious, but it had some significance to their relationship.
As it turned out, Penny and Leonard's fake proposal during Professor Proton's funeral was setting up their eventual engagement. Just after one episode in The Big Bang Theory season 7, episode 23," The Gorilla Dissolution," the pair finally get engaged for real. The circumstance surrounding the engagement was familiar. Similar to when Penny's cameo was cut from NCIS, she was distraught over how her career was shaping up when she suddenly brought up the idea of getting engaged.
The difference this time was that Penny was able to properly justify why she wanted to marry Leonard in The Big Bang Theory episode. She explained that she didn't really need external validation, she only needed her boyfriend. This warmed Leonard's heart and ultimately convinced him to take the idea seriously. What Penny didn't know was that Leonard had been secretly carrying a ring in his wallet, indicating that he had long been set on marrying her.