For gates, you need to open the toolbar, select the construction menu, select the walls and roads menu, and select Wall Gatehouse. You then need to place the gatehouse on a wall, between the turrets (towers). The gatehouse will turn from red to green when you have it in the proper place. If the wall has not been completely constructed, the gate will appear partially constructed, otherwise, if the wall is complete, the gate will be complete.
For manors and mansions, first you need to buy them. Open the toolbar, select the tributes menu, select the buildings menu, find the manor and mansion, and pay for the blueprints. Then you can build manors and mansions just like houses.