The Dashboard calculates with all transactions in the system, while the Gains page does not take deposits and withdrawals into consideration.
Deposits and withdrawals should be a closed loop for internal transfers of coins from one of your wallets / exchanges to another.
If you have just one (deposit or withdrawal) it superficially changes the dashboard balance, but is incorrect due to the missing partner.
The Missing Transactions Report shows where withdrawals and deposits are missing and vice versa, because a transfer from A to B within your portfolio always consists of a withdrawal A before the deposit B.
For further information on missing transactions, refer to this article: Missing Transactions Report: White entries (no match)
Once the mismatched entries in the Missing Transaction Report, which are displayed as white, have been corrected, the Gains Report and Dashboard will also match again.