It’s definitely possible, but you’ll have fewer options available to you. The more late payments you have on your credit file, the lower your credit score will be. But if your late payments were a while ago, and you don’t have any other issues on your credit file, you should be able to find a lender willing to give you a mortgage.
A lender will look at how long ago the late payments were and how much they were for. If your payments were recent and for a sizeable amount of money, some lenders might not consider you for a mortgage. Or they might offer you a mortgage but at a higher rate. If your late payments were years ago, for example, 5-6 years ago, you’ll have more options.
The size of your deposit will also be a big factor in your mortgage chances. The bigger your deposit, the more options you’ll have.