need help what part i need to my ide

Hope this is the right forum part, unless feel free to move it right.

Have a project open a port, but a bit unsure of what to buy to get my idea of working.

The idea is to open a port with 2st DC 12V motors. using UNO, arduino ultrasonic sensor.
But want the door to settle on time. So at 2 pm the gate will open for 5min, then close.
Since then ultrasonic senses it opens.

or can i controlle it on time using a L298P for exampel and just add it to the code, some how

So at 2 pm the gate will open for 5min, then close

If you want your Arduino to know what time of day it is, you should add a "Real-Time Clock" (RTC) module

As above, use a real time clock module to control your gate opening at a specific time. Or, if you are going to add a module that gives you internet access, like an ethernet shield or an ESP wifi adapter, you can have the project calculate local time from NTP servers. This is a bit more complicated though, so the RTC is a much simpler solution. DS3231 modules are cheap and easy to find on the internet and they connect using the I2C bus.

You might want to add some sort of sensor to this to indicate once the gate is fully open as well. Maybe a range finder "HC-SR04" or even a simple micro switch with will get depressed by the door.

As for timing these events, you only have to look at hours and minutes and most libraries for real time clock modules (There are too many versions of this library) have simple methods for requesting only hours, only minutes, only seconds etc. With the gate being opened at 2pm, you'll be using an if statement, something like this:

if (hours % 2 == 0)

But with this, you need to consider that this "If" will continue to return true for the whole hour, so you will have to work your own way around that. I have a program that logs sensor data every five seconds and I use the same kind of trick, but in my case, I just added a one second delay inside of the function that writes to my SD card so my if statement doesn't return true over and over. Initially it would have been writing to the SD card about fifteen times every five seconds.

It sounds like you need your motors to work forward and reverse, so an H-bridge or FET driver is going to be needed. I like to use the L293D for most projects, but depending on how much current your motors are drawing, you might need something more robust.

Do you know what current your motors need?