MinGW-w64 is a set of development tools that produce native Windows executables, not dependent on Cygwin’s POSIX emulation DLLs. MinGW-w64 has forked the original MinGW in 2007 in order to provide support for 64 bits and new APIs.
MSYS2 is software distribution and a building platform for Windows. MSYS2 is an independent rewrite of MSYS, based on modern Cygwin and MinGW-w64 with the aim of better interoperability with native Windows software. It plays the same role MSYS does in MinGW. Being a distribution, MSYS2 provides tools to build software as well as more than 2.600 precompiled packages ready for use.