Gentleman or gentlewoman is not, strictly speaking, a class. Either one is common, or one is noble. A gentleman or gentlewoman would be a product of one's wealth, and judging that wealth is a superficial exercise. For example, see Becky Sharp and Rawdon Crawley in Thackery's Vanity Fair
, and "living on nothing a year." If one has sufficient wealth so as not to need to soil one's hands in getting one's living, one can be considered gentle.
Strictly speaking of the class structure, if one is common, one can still be a gentleman or a gentlewoman if one has the means to live that well. If one is noble, one can fall below the means to live as a gentleman, but one remains noble. Generally speaking, one who is noble-born, and reasonably well educated in the sense of being taught how to behave when one was a child at home--such a one will be taken for a gentleman so long as one is reasonably attired, even if the clothing is shabby.
I am assuming that by the restoration you refer to the restoration of the Stuart monarchy in 1660 (i know of no other restoration if one refers to English history). "Class" mobility entirely depended upon whether or not one were noble, or would be ennobled. If Charles and James Stuart owed you money (quite a considerable body of people) or you had been a public supporter of their Father King Charles I, the chances of being ennobled, if one were not yet noble, were pretty good.
Economically, the times were very fluid, especially during the Anglo-Dutch wars. The Royal Navy, at least nominally under the command of James Stuart, actively protected English commerce, while the Dutch and their erstwhile French allies, attacked the Royal Navy, rather than English shipping. So English commerce prospered in the 1660s and -70s.
One result of the Anglo-Dutch wars was the seizure and cession of New Holland to England. New Holland was the former Dutch North American colony, as well as the former Swedish North American colony which had been taken over by the Dutch. Upon their cession to England, they became the colonies of New York (James Stuart was the Duke of York), New Jersey (upon the execution of King Charles I, Charles Stuart the younger was sheltering on the island of Jersey, and was recognized as King Charles II only on the island of Jersey--this was pay back, once again), and what became Delaware was originally "leased" to William Penn, and administered as a part of the Pennsylvania colony. Once again, this was pay back, because Charles and James Stuart owed at least 15,000 pounds sterling (possily more) to William Penn's father, and repaid that considerable sum by giving William Penn that huge colony.
There was a good deal of economic mobility, therefore, during the reign of King Charles II (1660-85), and that would determine whether nor not one were considered a gentleman. Marriage only entered into such a calculation to the extent that money were involved. If marriage brought money, one might set up for a gentleman. If one already had money, and managed not to lose it or squander it, one would be considered to be and treated as a gentleman.