Great Britain is the geographical island comprising three countries:
The United Kingdom (UK) is the sovereign state comprising four nations:
Northern Ireland is part of the UK but not part of Great Britain (it lies on the island of Ireland). The term "Britain" is often used informally for the UK, but strictly, Great Britain = 3 countries; UK = 4 nations.