While the game features online multiplayer, it focuses on asynchronous events and challenges, meaning you compete against other players' ghost data or participate in online races with a larger player base.
You cannot directly race against a single opponent in real-time within Gran Turismo 5.