When Gwaine met Arthur for the first time, he was unaware of his noble birth. Upon awakening in Gaius' chambers and realising that Arthur was nobility, his opinion of him was immediately lowered due to his previous experiences with royalty. He told Merlin that if he had known who Arthur was he wouldn't have saved him. However, when Arthur begged his father to let Gwaine live, Gwaine realised not all nobles were blinded by power. He returned to Camelot to save Arthur, and later called him friend. He was also willing to travel to the Barren Lands to help Arthur, despite the dangers. He did, however, agree to fight with Arthur when Jarl told them to, though this was only because Jarl would have killed both of them if one refused. Arthur later knighted Gwaine and Gwaine fought alongside him to rescue Uther and the Knights of Camelot from Morgause and Morgana.
Gwaine liked Merlin from the start, and after Merlin stood up to Arthur about Gwaine's debt, grew to trust him enough to tell him the truth about his birth (making Merlin the only other person with the knowledge of Gwaine's birth). He immediately agreed to come with Merlin when Arthur was on his quest to find the Trident of the Fisher King, and enjoyed being on the run with his friend. Gwaine later met Merlin and Arthur while he was a prisoner of Jarl and Merlin was delighted to see him despite their predicament.
Gwaine remains currently unaware of Merlin's powers.
Gwaine was attracted to Guinevere when he met her in the streets of Camelot, but though she wasn't interested, she liked that he tried yet knew when to give up. She was the last person he spoke to when leaving Camelot after his banishment, and it is likely that they enjoyed some harmless flirting.
Later Gwaine was generally pleased to see her and afterwards was one of the knights who went to bring her back to Camelot after the battle.