I believe ICAO (that would be the regulating authority) says be at the gate minimum 20 before departure.
Considering security queues, though, my advice is to check in online the night before and be at the airport at least 2 hours before departure for a large airport. Small ones you might be able to get away with less, but unless you go through regular and know the setup, I would not chance it. Your airline will give you instructions.
Check in counters normally close for bag drop 1h to 45min before departure here in Europe in my experience. Vast majority of airports also now support digital boarding passes in Europe.
My home airport is small so I can work with 1 hr before departure; Brussels was 20min queue at security; Frankfurt we were there 2h30 before departure but at the gate for less.than 10 minutes, queues were that long and slow-moving.
TSA knows who you are way ahead of time when you put your secure flight information in, and maybe it checks the information when your boarding pass is printed. Airlines close check-in so they don't have unexpected people showing up during boarding. But if you get rebooked on a different flight or something, they can check you in at the gate whenever.
Also, United and Delta let you check in 30 minutes prior to departure if you don't have bags.